mirror of
https://github.com/mattn/vim-lsp-settings.git
synced 2025-12-12 20:35:54 +01:00
Introduce g:lsp_settings_disable_suggestions (#265)
* Introduce g:lsp_settings_disable_suggestions * Problem: When you use lsp for certain filetypes, you see "Please do :LspInstallServer to enable Language Server" message every time when you open a file that you don't need lsp supports. It's hard to disable all the possible filetypes but the one you use. * Solution: Provide a way to opt-out the messages. * Revserse the role * Reverse even more
This commit is contained in:
@@ -477,7 +477,7 @@ function! s:vim_lsp_load_or_suggest(ft) abort
|
||||
delcommand LspRegisterServer
|
||||
|
||||
if l:disabled == 0 && l:found ==# 0
|
||||
if a:ft !=# '_'
|
||||
if a:ft !=# '_' && get(g:, 'lsp_settings_enable_suggestions', 1) == 1
|
||||
call s:vim_lsp_settings_suggest(a:ft)
|
||||
endif
|
||||
else
|
||||
|
||||
@@ -122,6 +122,12 @@ and put schemas property like below:
|
||||
}
|
||||
<
|
||||
|
||||
*g:lsp_settings_enable_suggestions*
|
||||
g:lsp_settings_enable_suggestions
|
||||
Default: 1
|
||||
Set 0 only if you'd like to opt-out "Please do :LspInstallServer to enable
|
||||
Language Server" suggestion messages.
|
||||
|
||||
:LspSettingsLocalEdit [root] *:LspSettingsLocalEdit*
|
||||
Edit local settings. Accepts an optional explicit [root] directory that
|
||||
contains the .vim-lsp-settings config directory.
|
||||
|
||||
Reference in New Issue
Block a user