aboutsummaryrefslogtreecommitdiff
path: root/test/functional/vimscript/executable_spec.lua
diff options
context:
space:
mode:
authorjdrouhard <john@drouhard.dev>2026-06-26 13:41:26 -0500
committerGitHub <noreply@github.com>2026-06-26 14:41:26 -0400
commitc98c93fcf87cb609acb88c9d806de679fe001f9d (patch)
tree2d98765259af140638b1b07b72149723ee4bfb19 /test/functional/vimscript/executable_spec.lua
parent85718f987432dd2a59f1db19e0c2113c0090d125 (diff)
downloadrneovim-c98c93fcf87cb609acb88c9d806de679fe001f9d.tar.gz
rneovim-c98c93fcf87cb609acb88c9d806de679fe001f9d.tar.bz2
rneovim-c98c93fcf87cb609acb88c9d806de679fe001f9d.zip
refactor(lsp): convert diagnostics to capability framework #40433
Problem: Diagnostic tracking used a separate bufstates table and manual LspDetach/LspNotify autocmd management via _enable()/_refresh(), duplicating the lifecycle logic already provided by the Capability framework. This caused inconsistencies in how client attach/detach and buffer teardown were handled compared to other LSP features. Solution: Replace the ad-hoc bufstate tracking and _enable/_refresh pattern in vim.lsp.diagnostic with a proper Diagnostics subclass of Capability. This cleans up a few random places in the main lsp module and client module that were poking the diagnostics. It also fixes some pre-existing bugs and inconsistencies that were discovered: - Refresh diagnostics immediately on attach instead of lazily by the first didOpen/didChange notification - Fix Capability.active lookup in M.enable() to key by it_bufnr instead of the filter bufnr - Set lsp defaults before calling the _text_document_did_open_handler in Client:on_attach() so defaults are there before any lsp notification occurs - Log (and return early) on any error from a diagnostic request result instead of only returning early for server cancelled errors
Diffstat (limited to 'test/functional/vimscript/executable_spec.lua')
0 files changed, 0 insertions, 0 deletions