diff options
author | James McCoy <jamessan@jamessan.com> | 2020-12-13 21:25:04 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-13 21:25:04 -0500 |
commit | d6115c996404e7ce6253c1ab131d661c2d873b9e (patch) | |
tree | 403559585bc84bc1740f1f7b1348b1ee45e8343d /runtime/lua/vim/lsp/protocol.lua | |
parent | 0285fae5ec06779654d9c7dd1577bd0d6fe73c4c (diff) | |
parent | e8ae3ade770843681f72fc49be45338b39bea922 (diff) | |
download | rneovim-d6115c996404e7ce6253c1ab131d661c2d873b9e.tar.gz rneovim-d6115c996404e7ce6253c1ab131d661c2d873b9e.tar.bz2 rneovim-d6115c996404e7ce6253c1ab131d661c2d873b9e.zip |
Merge pull request #12624 from qvacua/build-arm64-mac
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r-- | runtime/lua/vim/lsp/protocol.lua | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua index 218424fa14..fd86d8bb97 100644 --- a/runtime/lua/vim/lsp/protocol.lua +++ b/runtime/lua/vim/lsp/protocol.lua @@ -292,8 +292,9 @@ local constants = { } for k, v in pairs(constants) do - vim.tbl_add_reverse_lookup(v) - protocol[k] = v + local tbl = vim.deepcopy(v) + vim.tbl_add_reverse_lookup(tbl) + protocol[k] = tbl end --[=[ @@ -623,7 +624,11 @@ function protocol.make_client_capabilities() codeActionLiteralSupport = { codeActionKind = { - valueSet = vim.tbl_values(protocol.CodeActionKind); + valueSet = (function() + local res = vim.tbl_values(protocol.CodeActionKind) + table.sort(res) + return res + end)(); }; }; }; @@ -643,7 +648,7 @@ function protocol.make_client_capabilities() completionItemKind = { valueSet = (function() local res = {} - for k in pairs(protocol.CompletionItemKind) do + for k in ipairs(protocol.CompletionItemKind) do if type(k) == 'number' then table.insert(res, k) end end return res @@ -689,7 +694,7 @@ function protocol.make_client_capabilities() symbolKind = { valueSet = (function() local res = {} - for k in pairs(protocol.SymbolKind) do + for k in ipairs(protocol.SymbolKind) do if type(k) == 'number' then table.insert(res, k) end end return res @@ -708,7 +713,7 @@ function protocol.make_client_capabilities() symbolKind = { valueSet = (function() local res = {} - for k in pairs(protocol.SymbolKind) do + for k in ipairs(protocol.SymbolKind) do if type(k) == 'number' then table.insert(res, k) end end return res |