aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/lsp/protocol.lua
diff options
context:
space:
mode:
authorChristian Clason <christian.clason@uni-due.de>2020-05-02 17:56:05 +0200
committerGitHub <noreply@github.com>2020-05-02 17:56:05 +0200
commitea347b18d883999ed9a8d2e7c00068058135232f (patch)
treeca1271a72e36e45d6450f8009f9f6e668576c1f5 /runtime/lua/vim/lsp/protocol.lua
parent2f42e4d0c86163e64eb56077939fe405dc434e42 (diff)
downloadrneovim-ea347b18d883999ed9a8d2e7c00068058135232f.tar.gz
rneovim-ea347b18d883999ed9a8d2e7c00068058135232f.tar.bz2
rneovim-ea347b18d883999ed9a8d2e7c00068058135232f.zip
lsp: add workspace/symbol (#12224)
* lsp: add workspace/symbol * refactor symbol callback * set hierarchical symbol support to true * add documentation and default mapping Co-authored-by: Hirokazu Hata <h.hata.ai.t@gmail.com>
Diffstat (limited to 'runtime/lua/vim/lsp/protocol.lua')
-rw-r--r--runtime/lua/vim/lsp/protocol.lua13
1 files changed, 13 insertions, 0 deletions
diff --git a/runtime/lua/vim/lsp/protocol.lua b/runtime/lua/vim/lsp/protocol.lua
index bca4840674..1c499d23a6 100644
--- a/runtime/lua/vim/lsp/protocol.lua
+++ b/runtime/lua/vim/lsp/protocol.lua
@@ -688,6 +688,19 @@ function protocol.make_client_capabilities()
};
hierarchicalDocumentSymbolSupport = true;
};
+ workspaceSymbol = {
+ dynamicRegistration = false;
+ symbolKind = {
+ valueSet = (function()
+ local res = {}
+ for k in pairs(protocol.SymbolKind) do
+ if type(k) == 'number' then table.insert(res, k) end
+ end
+ return res
+ end)();
+ };
+ hierarchicalWorkspaceSymbolSupport = true;
+ };
};
workspace = nil;
experimental = nil;