mirror of
https://github.com/mattn/vim-lsp-settings.git
synced 2025-12-12 20:35:54 +01:00
Warn when user requests install of something disabled by config
This is now not possible thanks to the prior commit, but would also lead to the user confused that they've installed something and it is still disabled in vim-lsp-settings.
This commit is contained in:
@@ -100,18 +100,30 @@ function! s:vim_lsp_installer(ft, ...) abort
|
||||
endif
|
||||
|
||||
if lsp_settings#get(l:conf.command, 'disabled', get(l:conf, 'disabled', 0))
|
||||
if !empty(l:name) && l:conf.command == l:name
|
||||
call lsp_settings#utils#warning(l:name . ' requested but is disabled by global or local settings')
|
||||
endif
|
||||
continue
|
||||
endif
|
||||
|
||||
if type(l:default) ==# v:t_list
|
||||
if len(l:default) ># 0 && index(l:default, l:server.command) == -1
|
||||
if !empty(l:name) && l:conf.command == l:name
|
||||
call lsp_settings#utils#warning(l:name . ' requested but is disabled by g:lsp_settings_filetype_' . a:ft)
|
||||
endif
|
||||
continue
|
||||
endif
|
||||
elseif type(l:default) ==# v:t_string
|
||||
if !empty(l:default) && l:default != l:server.command
|
||||
if !empty(l:name) && l:conf.command == l:name
|
||||
call lsp_settings#utils#warning(l:name . ' requested but is disabled by g:lsp_settings_filetype_' . a:ft)
|
||||
endif
|
||||
continue
|
||||
endif
|
||||
else
|
||||
if !empty(l:name) && l:conf.command == l:name
|
||||
call lsp_settings#utils#warning(l:name . ' requested but is disabled by g:lsp_settings_filetype_' . a:ft)
|
||||
endif
|
||||
continue
|
||||
endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user