aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/loader.lua
diff options
context:
space:
mode:
authorOlivia Kinnear <git@superatomic.dev>2026-01-27 15:17:45 -0600
committerGitHub <noreply@github.com>2026-01-27 13:17:45 -0800
commit34815777b28091e6a333ccab4ef2834a84248acb (patch)
tree7b8b538cc9e6bf3de4f1c3c057e08ff110fca212 /runtime/lua/vim/loader.lua
parent1d57374c41e6c46c41d537c342ce30ad96cdb85b (diff)
downloadrneovim-34815777b28091e6a333ccab4ef2834a84248acb.tar.gz
rneovim-34815777b28091e6a333ccab4ef2834a84248acb.tar.bz2
rneovim-34815777b28091e6a333ccab4ef2834a84248acb.zip
fix(lsp): remove side-effects if `vim.lsp.enable()` raises an error (#37571)
Problem: If `vim.lsp.enable()` fails with an error, either because `'*'` is one of the provided names or because there is an error in a config, `vim.lsp.enable()` will still have side-effects: - All names before the one that encountered an error will still be added to `lsp._enabled_configs`, but the autocommand will not get added or run. - Any name which makes `vim.lsp.config[name]` error will be added to `lsp._enabled_configs`, causing all future calls to `vim.lsp.enable()` to fail. This will also break `:che vim.lsp`. Solution: - Check all names for errors before modifying `lsp._enabled_configs`. - Check `vim.lsp.config[name]` does not raise an error before enabling the name.
Diffstat (limited to 'runtime/lua/vim/loader.lua')
0 files changed, 0 insertions, 0 deletions