diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-04-07 02:58:03 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-04-07 02:58:03 +0800 |
commit | 84441873f6b0e4a75ee9b9d96d88c5609c7a48dc (patch) | |
tree | 6f390e1e74cca7a0b0bb70a7680519af0fa43c04 /script/core/hover | |
parent | e9975c2081dfe2f42392a7612b2a3862e513e45e (diff) | |
download | lua-language-server-84441873f6b0e4a75ee9b9d96d88c5609c7a48dc.zip |
update
Diffstat (limited to 'script/core/hover')
-rw-r--r-- | script/core/hover/description.lua | 16 |
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) |