fix(lsp): properly get buffer for dynamic capabilities

This commit is contained in:
Lawrence Ho 2024-05-26 04:08:26 +00:00
parent 0f6ff53ce3
commit 92b0a4f386

View file

@ -44,7 +44,7 @@ function M.setup()
local ret = register_capability(err, res, ctx)
local client = vim.lsp.get_client_by_id(ctx.client_id)
if client then
for buffer in ipairs(client.attached_buffers) do
for buffer in pairs(client.attached_buffers) do
vim.api.nvim_exec_autocmds("User", {
pattern = "LspDynamicCapability",
data = { client_id = client.id, buffer = buffer },