aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/executable_spec.lua
diff options
context:
space:
mode:
authorjdrouhard <john@drouhard.dev>2026-06-26 14:19:42 -0500
committerGitHub <noreply@github.com>2026-06-26 15:19:42 -0400
commit150088551ec3734d75e4c57f9033fc96b1e71a8b (patch)
tree22f07130801ae3ea0426085e2e334c122724f0a1 /test/functional/vimscript/executable_spec.lua
parentc98c93fcf87cb609acb88c9d806de679fe001f9d (diff)
downloadrneovim-150088551ec3734d75e4c57f9033fc96b1e71a8b.tar.gz
rneovim-150088551ec3734d75e4c57f9033fc96b1e71a8b.tar.bz2
rneovim-150088551ec3734d75e4c57f9033fc96b1e71a8b.zip
fix(lsp): define autocmds for capabilities once per buffer #40435
fix(lsp): define autocmds for capabilities in new(), not on_attach() Problem: Defining autocmds in on_attach() caused issues when multiple clients provide the same capability for a buffer. Each attaching client would "replace" the previously defined one since they are all identical. Then the first one to detach clears them out and any remaining attached clients would no longer trigger the autocmd for the capability. Further, the semantic tokens module itself didn't quite work with multiple clients since any LspNotify (from any client) would send a token request to all attached clients with no differentiation and the debounce timer was shared across all clients. Solution: Always define the buffer-local autocmds in the capability's `new()` function, and don't mess with the autocmds in on_attach or on_detach. The capability framework itself will clear the autocmds when the last client detaches. Also, refactor a bit of the semantic tokens module so that the various methods take a specific client_id to perform the work on, and split out timers so each client has its own.
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions