aboutsummaryrefslogtreecommitdiffstats
path: root/lua/lspconfig/manager.lua
diff options
context:
space:
mode:
authorGregory Anders <8965202+gpanders@users.noreply.github.com>2024-04-26 10:07:56 -0500
committerGitHub <noreply@github.com>2024-04-26 10:07:56 -0500
commit2a1999b817050a977c33a5f0ad0cecd9f0e75a6e (patch)
treebda0b501c6c670322f5c719a9e6924e28512a4e8 /lua/lspconfig/manager.lua
parentdocs: update server_configurations.md (diff)
downloadnvim-lspconfig-2a1999b817050a977c33a5f0ad0cecd9f0e75a6e.tar
nvim-lspconfig-2a1999b817050a977c33a5f0ad0cecd9f0e75a6e.tar.gz
nvim-lspconfig-2a1999b817050a977c33a5f0ad0cecd9f0e75a6e.tar.bz2
nvim-lspconfig-2a1999b817050a977c33a5f0ad0cecd9f0e75a6e.tar.lz
nvim-lspconfig-2a1999b817050a977c33a5f0ad0cecd9f0e75a6e.tar.xz
nvim-lspconfig-2a1999b817050a977c33a5f0ad0cecd9f0e75a6e.tar.zst
nvim-lspconfig-2a1999b817050a977c33a5f0ad0cecd9f0e75a6e.zip
refactor: handle updated signature of lsp.start_client (#3126)
https://github.com/neovim/neovim/pull/28478 changes the signature of start_client to return two values: client_id or nil and error message or nil. start_client no longer calls vim.notify directly, so if there is an error we must call vim.notify ourselves.
Diffstat (limited to 'lua/lspconfig/manager.lua')
-rw-r--r--lua/lspconfig/manager.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/lua/lspconfig/manager.lua b/lua/lspconfig/manager.lua
index b1563481..9b2c7d02 100644
--- a/lua/lspconfig/manager.lua
+++ b/lua/lspconfig/manager.lua
@@ -149,8 +149,13 @@ function M:_start_new_client(bufnr, new_config, root_dir, single_file)
new_config.root_dir = nil
new_config.workspace_folders = nil
end
- local client_id = lsp.start_client(new_config)
+
+ -- TODO: Replace lsp.start_client with lsp.start
+ local client_id, err = lsp.start_client(new_config)
if not client_id then
+ if err then
+ vim.notify(err, vim.log.levels.WARN)
+ end
return
end
self:_attach_and_cache(bufnr, root_dir, client_id)