summaryrefslogtreecommitdiff
path: root/script/core/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-05-27 19:28:41 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-05-27 19:28:41 +0800
commite3fbbd8ce94a9b92e6bb135b05d35d90c90386b5 (patch)
treee4ae737d990f88d6f6476d05687753ff2e3e6465 /script/core/hover
parent1110e83bb47345a487aa78cc343ef501b86f7d4b (diff)
downloadlua-language-server-e3fbbd8ce94a9b92e6bb135b05d35d90c90386b5.zip
update
Diffstat (limited to 'script/core/hover')
-rw-r--r--script/core/hover/label.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/script/core/hover/label.lua b/script/core/hover/label.lua
index b2b61cc7..73d924e1 100644
--- a/script/core/hover/label.lua
+++ b/script/core/hover/label.lua
@@ -32,13 +32,14 @@ local function asDocFunction(source)
end
local function asDocTypeName(source)
- for _, doc in ipairs(vm.getDocTypes(source[1])) do
+ local defs = searcher.requestDefinition(source)
+ for _, doc in ipairs(defs) do
if doc.type == 'doc.class.name' then
- return 'class ' .. source[1]
+ return 'class ' .. doc[1]
end
if doc.type == 'doc.alias.name' then
local extends = doc.parent.extends
- return lang.script('HOVER_EXTENDS', vm.getInferType(extends))
+ return lang.script('HOVER_EXTENDS', infer.searchAndViewInfers(extends))
end
end
end