fix(lsp): check lsp handlers after LspAttach, since attached_buffers won't have been set

This commit is contained in:
Folke Lemaitre 2025-11-03 07:27:12 +01:00
parent bd3c1a0714
commit 1861b0a8ea
No known key found for this signature in database
GPG key ID: 9B52594D560070AB

View file

@ -69,7 +69,9 @@ local function setup()
vim.api.nvim_create_autocmd("LspAttach", {
group = vim.api.nvim_create_augroup("snacks.lsp.on_attach", { clear = true }),
callback = function(ev)
_handle({ id = ev.data.client_id, buffer = ev.buf })
vim.schedule(function()
_handle({ id = ev.data.client_id, buffer = ev.buf })
end)
end,
})
end