mirror of
https://github.com/neovim/neovim.git
synced 2025-12-09 16:12:48 +00:00
LSP: Fix nil settings handling in workspace/configuration (#13708)
The `workspace/configuration` handler could fail with the following
error if `config.settings` is nil:
runtime/lua/vim/lsp/util.lua:1432: attempt to index local 'settings' (a nil value)"
This ensures that `config.settings` is always initialized to an empty
table.
This commit is contained in:
committed by
GitHub
parent
51936126d3
commit
3f63100d5b
@@ -162,6 +162,7 @@ M['workspace/configuration'] = function(err, _, params, client_id)
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
if not client then
|
||||
err_message("LSP[id=", client_id, "] client has shut down after sending the message")
|
||||
return
|
||||
end
|
||||
if err then error(vim.inspect(err)) end
|
||||
if not params.items then
|
||||
|
||||
Reference in New Issue
Block a user