diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-09-28 17:44:46 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-09-28 17:44:46 +0800 |
commit | c45a21271556b6c689ee61fd5353846f469e4622 (patch) | |
tree | df0ce3ef26ba916b230ffc27e25168e3947f2273 /script/core/hover | |
parent | f1a974b7ea759adcd4af571bc7752d5b4761927b (diff) | |
download | lua-language-server-c45a21271556b6c689ee61fd5353846f469e4622.zip |
#477 supports hover
Diffstat (limited to 'script/core/hover')
-rw-r--r-- | script/core/hover/description.lua | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/script/core/hover/description.lua b/script/core/hover/description.lua index fc220c74..f0534373 100644 --- a/script/core/hover/description.lua +++ b/script/core/hover/description.lua @@ -344,16 +344,10 @@ local function tyrDocParamComment(source) if source.parent.type ~= 'funcargs' then return end - if not source.bindDocs then - return - end - for _, doc in ipairs(source.bindDocs) do - if doc.type == 'doc.param' then - if doc.param[1] == source[1] then - if doc.comment then - return doc.comment.text - end - break + for _, def in ipairs(vm.getDefs(source)) do + if def.type == 'doc.param' then + if def.comment then + return def.comment.text end end end |