File tree 2 files changed +12
-2
lines changed
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -69,8 +69,15 @@ function! conjure#omnicomplete(findstart, base)
69
69
endfunction
70
70
71
71
function ! conjure#update_completions ()
72
- if conjure#upsert_job () == 0
73
- call rpcnotify (s: jobid , " update_completions" )
72
+ if s: jobid != 0
73
+ if exists (" b:conjure_last_completion_changedtick" ) == 0
74
+ let b: conjure_last_completion_changedtick = -1
75
+ endif
76
+
77
+ if b: conjure_last_completion_changedtick < g: conjure_changedtick
78
+ call rpcnotify (s: jobid , " update_completions" )
79
+ let b: conjure_last_completion_changedtick = g: conjure_changedtick
80
+ endif
74
81
endif
75
82
endfunction
76
83
Original file line number Diff line number Diff line change @@ -68,6 +68,7 @@ endfunction
68
68
let g: conjure_refresh_dirs = [" src" ]
69
69
let g: conjure_refresh_args = " "
70
70
let g: conjure_logging = 0
71
+ let g: conjure_changedtick = 0
71
72
72
73
augroup conjure_bindings
73
74
autocmd !
@@ -92,4 +93,6 @@ augroup conjure_bindings
92
93
93
94
autocmd FileType clojure setlocal omnifunc = conjure#omnicomplete
94
95
autocmd CursorHold * if &ft == # ' clojure' | call conjure#update_completions ()
96
+ autocmd TextChanged * if &ft == # ' clojure' | let g: conjure_changedtick += 1
97
+ autocmd TextChangedI * if &ft == # ' clojure' | let g: conjure_changedtick += 1
95
98
augroup END
You can’t perform that action at this time.
0 commit comments