1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-02 20:30:05 +08:00

fix(java): enable jc2 only when no lsp

This commit is contained in:
wsdjeg 2022-11-02 00:44:01 +08:00
parent 2a7798f009
commit 6ad45ced73

View File

@ -131,9 +131,11 @@ let s:java_file_head = [
let s:java_interpreter = 'java'
function! SpaceVim#layers#lang#java#plugins() abort
let plugins = [
\ [g:_spacevim_root_dir . 'bundle/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}],
\ ]
let plugins = []
if !SpaceVim#layers#lsp#check_filetype('java')
\ && !SpaceVim#layers#lsp#check_server('jdtls')
call add(plugins, [g:_spacevim_root_dir . 'bundle/vim-javacomplete2', { 'on_ft' : ['java','jsp'], 'loadconf' : 1}])
endif
call add(plugins, [g:_spacevim_root_dir . 'bundle/JavaUnit.vim', {'on_ft' : 'java'}])
call add(plugins, [g:_spacevim_root_dir . 'bundle/java_getset.vim', {'on_ft' : 'java'}])
call add(plugins, [g:_spacevim_root_dir . 'bundle/vim-dict', {'on_ft' : 'java'}])