summaryrefslogtreecommitdiff
path: root/script/core/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-04-07 02:58:03 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-04-07 02:58:03 +0800
commit84441873f6b0e4a75ee9b9d96d88c5609c7a48dc (patch)
tree6f390e1e74cca7a0b0bb70a7680519af0fa43c04 /script/core/hover
parente9975c2081dfe2f42392a7612b2a3862e513e45e (diff)
downloadlua-language-server-84441873f6b0e4a75ee9b9d96d88c5609c7a48dc.zip
update
Diffstat (limited to 'script/core/hover')
-rw-r--r--script/core/hover/description.lua16
1 files changed, 3 insertions, 13 deletions
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua
index d3d24a75..8fe2eb4f 100644
--- a/script/core/hover/description.lua
+++ b/script/core/hover/description.lua
@@ -125,24 +125,14 @@ end
local function tryDocClassComment(source)
for _, def in ipairs(vm.getDefs(source)) do
- if def.type == 'doc.class.name'
- or def.type == 'doc.alias.name' then
- local class = noder.getDocState(def)
- local comment = getBindComment(class, class.bindGroup, class)
+ if def.type == 'doc.class'
+ or def.type == 'doc.alias' then
+ local comment = getBindComment(def, def.bindGroup, def)
if comment then
return comment
end
end
end
- if source.bindDocs then
- for _, doc in ipairs(source.bindDocs) do
- if doc.type == 'doc.class'
- or doc.type == 'doc.alias' then
- local comment = getBindComment(doc, source.bindDocs, doc)
- return comment
- end
- end
- end
end
local function tryDocModule(source)