summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
Diffstat (limited to 'server/src')
-rw-r--r--server/src/matcher/document_symbol.lua61
1 files changed, 30 insertions, 31 deletions
diff --git a/server/src/matcher/document_symbol.lua b/server/src/matcher/document_symbol.lua
index 3c636941..b6802c93 100644
--- a/server/src/matcher/document_symbol.lua
+++ b/server/src/matcher/document_symbol.lua
@@ -1,50 +1,50 @@
local hover = require 'matcher.hover'
local SymbolKind = {
- File = 1,
- Module = 2,
- Namespace = 3,
- Package = 4,
- Class = 5,
- Method = 6,
- Property = 7,
- Field = 8,
- Constructor = 9,
- Enum = 10,
- Interface = 11,
- Function = 12,
- Variable = 13,
- Constant = 14,
- String = 15,
- Number = 16,
- Boolean = 17,
- Array = 18,
- Object = 19,
- Key = 20,
- Null = 21,
- EnumMember = 22,
- Struct = 23,
- Event = 24,
- Operator = 25,
- TypeParameter = 26,
+ File = 1,
+ Module = 2,
+ Namespace = 3,
+ Package = 4,
+ Class = 5,
+ Method = 6,
+ Property = 7,
+ Field = 8,
+ Constructor = 9,
+ Enum = 10,
+ Interface = 11,
+ Function = 12,
+ Variable = 13,
+ Constant = 14,
+ String = 15,
+ Number = 16,
+ Boolean = 17,
+ Array = 18,
+ Object = 19,
+ Key = 20,
+ Null = 21,
+ EnumMember = 22,
+ Struct = 23,
+ Event = 24,
+ Operator = 25,
+ TypeParameter = 26,
}
local function buildFunc(vm, func, nextFunction, nextFinish)
local source = func.source
- local var = vm.results.sources[source]
+ local var = vm.results.sources[source.name]
if not var then
return
end
- local hvr = hover(var, source)
+ local hvr = hover(var, source.name)
if not hvr then
return
end
return {
name = hvr.name,
- detail = hvr.title,
+ detail = hvr.label,
kind = SymbolKind.Function,
range = { source.start, source.finish },
- selectionRange = { source.start, source.start },
+ selectionRange = { source.name.start, source.name.finish },
}
end
@@ -71,7 +71,6 @@ return function (vm)
break
end
symbols[1] = buildFunc(vm, func, nextFunction, nextFinish)
- do break end
end
return symbols