-
Notifications
You must be signed in to change notification settings - Fork 411
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: remove deprecated use of vim.tbl_add_reverse_lookup #1931
Conversation
merge pls msg is anoying |
thank you! |
@hrsh7th @lewis6991 This iterates while adding new keys, which doesn't seem to cause any issues but is technically undefined afaik. |
Yes, I just realised that. Hopefully this doesn't cause an issue but fixing should be easy if it does. |
I could confirm this causes some kv pairs not added on my end. I added a print statement just after the loop assignments: diff --git a/lua/cmp/types/lsp.lua b/lua/cmp/types/lsp.lua
index 65d6301..2dfa192 100644
--- a/lua/cmp/types/lsp.lua
+++ b/lua/cmp/types/lsp.lua
@@ -205,6 +205,7 @@ lsp.CompletionItemKind = {
for k, v in pairs(lsp.CompletionItemKind) do
lsp.CompletionItemKind[v] = k
end
+vim.print(lsp.CompletionItemKind)
---@class lsp.internal.CompletionItemDefaults
---@field public commitCharacters? string[] And occasionally it shows that some pairs are not correctly added:
|
fixup! fix: remove deprecated use of vim.tbl_add_reverse_lookup (hrsh7th#1931)
No description provided.