Skip to content

Commit a12a42a

Browse files
committed
add option to disable automatic server recompilation
fix #400
1 parent 1a3b69b commit a12a42a

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,13 @@ let g:JavaComplete_EnableDefaultMappings = 0
200200

201201
`let g:JavaComplete_CustomTemplateDirectory = '~/jc_templates'` - set directory that contains custom templates, for class creation. By default this options is null.
202202

203-
`let g:JavaComplete_AutoStartServer = 0` - Disable automatic startup of server
203+
`let g:JavaComplete_AutoStartServer = 0` - Disable automatic startup of server.
204204

205205
`let g:JavaComplete_CompletionResultSort = 1` - Sort completion results alphabetically.
206206

207-
`let g:JavaComplete_IgnoreErrorMsg = 1` When it is greater than 0, the error message will be ignored. By default it is 0.
207+
`let g:JavaComplete_IgnoreErrorMsg = 1` - When it is greater than 0, the error message will be ignored. By default it is 0.
208+
209+
`let g:JavaComplete_CheckServerVersionAtStartup = 0` - Check server version on startup. Can be disabled on slow start, or infinite recompilation. By default it is 1.
208210

209211
## Commands
210212

autoload/javacomplete/server.vim

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ endfunction
8787

8888
function! javacomplete#server#Start()
8989
if s:Poll() == 0 && s:serverStartBlocked == 0
90-
call s:ControlServerAppVersion()
90+
if get(g:, 'JavaComplete_CheckServerVersionAtStartup', 1)
91+
call s:ControlServerAppVersion()
92+
endif
9193

9294
JavacompletePy import vim
9395
let file = g:JavaComplete_Home. g:FILE_SEP. "autoload". g:FILE_SEP. "javavibridge.py"

doc/javacomplete.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,12 @@ A single letter indicates the kind of compeltion item. These kinds are:
352352
let g:JavaComplete_IgnoreErrorMsg = 1
353353
By default this options is 0.
354354

355+
Check server version on startup. Can be disabled on slow start, or
356+
infinite recompilation:
357+
358+
let g:JavaComplete_CheckServerVersionAtStartup = 0
359+
By default this options is 1.
360+
355361

356362
2.4 Commands *javacomplete-commands*
357363

0 commit comments

Comments
 (0)