autoload/lsp.vim | 4 +++- autoload/lspoptions.vim | 2 ++ doc/lsp.txt | 2 ++ diff --git a/autoload/lsp.vim b/autoload/lsp.vim index 772da603016cf563bbfb570bd86996ecf3c4001e..82b2926d14e191bd4c25b75406c5cdbc42082470 100644 --- a/autoload/lsp.vim +++ b/autoload/lsp.vim @@ -438,7 +438,9 @@ server['omnicompl'] = v:true endif if !executable(server.path) - util.ErrMsg('Error: LSP server ' .. server.path .. ' is not found') + if !opt.lspOptions.ignoreMissingServer + util.ErrMsg('Error: LSP server ' .. server.path .. ' is not found') + endif return endif if server.args->type() != v:t_list diff --git a/autoload/lspoptions.vim b/autoload/lspoptions.vim index bada2f840930d5dd046605f9f8b7409d215708e2..f779017440d507d1bedb499d87139dd6a7d39500 100644 --- a/autoload/lspoptions.vim +++ b/autoload/lspoptions.vim @@ -29,6 +29,8 @@ # Suppress diagnostic hover from appearing when the mouse is over the line instead of the signature noDiagHoverOnLine: true, # Show a diagnostic message on a status line showDiagOnStatusLine: false, + # Don't print message when a configured language server is missing. + ignoreMissingServer: false } # set LSP options from user provided options diff --git a/doc/lsp.txt b/doc/lsp.txt index 486c5e54dc8a597ab7f005afb6ae50bc66f4b60d..a16c0858bbf5ecbb475b8979e5586746be558612 100644 --- a/doc/lsp.txt +++ b/doc/lsp.txt @@ -222,6 +222,8 @@ the mouse is over the line instead of the signature. By default this is set to true showDiagOnStatusLine Show a diagnostic message on a status line. By default this is set to false +ignoreMissingServer Do not print a missing language server executable. + By default this is set to false For example, to disable the automatic placement of signs for the LSP diagnostic messages, you can add the following line to your .vimrc file: