We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 56822a5 commit 2c010a9Copy full SHA for 2c010a9
lua/astrolsp/init.lua
@@ -282,7 +282,9 @@ function M.setup(opts)
282
local register_capability_handler = vim.lsp.handlers["client/registerCapability"]
283
vim.lsp.handlers["client/registerCapability"] = function(err, res, ctx)
284
local ret = register_capability_handler(err, res, ctx)
285
- configure_environment(assert(vim.lsp.get_client_by_id(ctx.client_id)), vim.api.nvim_get_current_buf())
+ local client = assert(vim.lsp.get_client_by_id(ctx.client_id))
286
+ -- TODO: remove `if` statement when dropping support for Neovim v0.9
287
+ if client.supports_method then configure_environment(client, vim.api.nvim_get_current_buf()) end
288
return ret
289
end
290
0 commit comments