fix(lsp): update keymaps *after* registering capabilities
This commit is contained in:
@ -99,12 +99,13 @@ return {
|
||||
local register_capability = vim.lsp.handlers["client/registerCapability"]
|
||||
|
||||
vim.lsp.handlers["client/registerCapability"] = function(err, res, ctx)
|
||||
local ret = register_capability(err, res, ctx)
|
||||
local client_id = ctx.client_id
|
||||
---@type lsp.Client
|
||||
local client = vim.lsp.get_client_by_id(client_id)
|
||||
local buffer = vim.api.nvim_get_current_buf()
|
||||
require("lazyvim.plugins.lsp.keymaps").on_attach(client, buffer)
|
||||
return register_capability(err, res, ctx)
|
||||
return ret
|
||||
end
|
||||
|
||||
-- diagnostics
|
||||
|
Reference in New Issue
Block a user