aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp.lua
diff options
context:
space:
mode:
authorii14 <59243201+ii14@users.noreply.github.com>2022-04-30 23:22:47 +0200
committerGitHub <noreply@github.com>2022-04-30 23:22:47 +0200
commit039d60bd9c4468bb53958943196390673569bd7b (patch)
tree10c7f20b20efdbedab029c0f986089a06c177673 /runtime/lua/vim/lsp.lua
parent0344736aa698dc205f8f9f80609b7033308d39ca (diff)
downloadrneovim-039d60bd9c4468bb53958943196390673569bd7b.tar.gz
rneovim-039d60bd9c4468bb53958943196390673569bd7b.tar.bz2
rneovim-039d60bd9c4468bb53958943196390673569bd7b.zip
fix(lsp): fix infinite loop in resolved_capabilities deprecation message (#18333)
Co-authored-by: ii14 <ii14@users.noreply.github.com>
Diffstat (limited to 'runtime/lua/vim/lsp.lua')
-rw-r--r--runtime/lua/vim/lsp.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/lua/vim/lsp.lua b/runtime/lua/vim/lsp.lua
index 5c35d3916f..19ee75a1b6 100644
--- a/runtime/lua/vim/lsp.lua
+++ b/runtime/lua/vim/lsp.lua
@@ -971,10 +971,10 @@ function lsp.start_client(config)
"update your plugins or configuration to access client.server_capabilities instead." ..
"The new key/value pairs in server_capabilities directly match those " ..
"defined in the language server protocol", vim.log.levels.WARN)
- table[key] = protocol._resolve_capabilities_compat(client.server_capabilities)
- return table[key]
+ rawset(table, key, protocol._resolve_capabilities_compat(client.server_capabilities))
+ return rawget(table, key)
else
- return table[key]
+ return rawget(table, key)
end
end
setmetatable(client, mt)