mirror of
https://github.com/mattn/vim-lsp-settings.git
synced 2025-12-12 20:35:54 +01:00
revert lazy load
This commit is contained in:
@@ -657,6 +657,7 @@ function! lsp_settings#init() abort
|
||||
command! -bang -nargs=? -complete=customlist,lsp_settings#complete_install LspInstallServer call s:vim_lsp_install_server(&l:filetype, <q-args>, '<bang>')
|
||||
call s:vim_lsp_load_or_suggest('_')
|
||||
|
||||
if get(g:, 'lsp_settings_lazyload', 0)
|
||||
doautocmd BufNewFile,BufEnter
|
||||
for l:buf in range(1, bufnr('$'))
|
||||
if !bufexists(l:buf) || !bufloaded(l:buf)
|
||||
@@ -665,4 +666,5 @@ function! lsp_settings#init() abort
|
||||
call lsp#log_verbose('lsp#ensure_flush_all()', l:buf)
|
||||
call lsp#ensure_flush_all(l:buf, lsp#get_allowed_servers(l:buf))
|
||||
endfor
|
||||
endif
|
||||
endfunction
|
||||
|
||||
@@ -16,7 +16,11 @@ command! -nargs=? LspSettingsLocalEdit call lsp_settings#profile#edit_local(<f-a
|
||||
command! -nargs=0 LspSettingsGlobalEdit call lsp_settings#profile#edit_global()
|
||||
command! -nargs=0 LspManageServers call lsp_settings#ui#open()
|
||||
|
||||
if get(g:, 'lsp_settings_lazyload', 0)
|
||||
augroup vim_lsp_settings_initialize
|
||||
au!
|
||||
autocmd VimEnter * call lsp_settings#init()
|
||||
augroup END
|
||||
else
|
||||
call lsp_settings#init()
|
||||
endif
|
||||
|
||||
Reference in New Issue
Block a user