lsp: add 'textDocument/documentSymbol’ callback

Spec: https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_documentSymbol
This commit is contained in:
Hirokazu Hata
2020-02-22 21:20:38 +09:00
parent f157fdef7e
commit 16262472cd
6 changed files with 80 additions and 28 deletions

View File

@@ -663,19 +663,19 @@ function protocol.make_client_capabilities()
documentHighlight = {
dynamicRegistration = false
};
-- documentSymbol = {
-- dynamicRegistration = false;
-- symbolKind = {
-- valueSet = (function()
-- local res = {}
-- for k in pairs(protocol.SymbolKind) do
-- if type(k) == 'string' then table.insert(res, k) end
-- end
-- return res
-- end)();
-- };
-- hierarchicalDocumentSymbolSupport = false;
-- };
documentSymbol = {
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)();
};
hierarchicalDocumentSymbolSupport = true;
};
};
workspace = nil;
experimental = nil;