diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-08-13 03:45:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-08-13 03:45:38 +0800 |
commit | c62b62ee0c0fb980d96089d546388efd70fc6ebe (patch) | |
tree | 52506650bb52291371b7d0d543b410a334394366 /script/parser/luadoc.lua | |
parent | c273b04b9a6fe9601036d4401fb020238a1acc15 (diff) | |
download | lua-language-server-c62b62ee0c0fb980d96089d546388efd70fc6ebe.zip |
fix #1446
Diffstat (limited to 'script/parser/luadoc.lua')
-rw-r--r-- | script/parser/luadoc.lua | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/script/parser/luadoc.lua b/script/parser/luadoc.lua index ea6d7654..4393e23d 100644 --- a/script/parser/luadoc.lua +++ b/script/parser/luadoc.lua @@ -1697,7 +1697,15 @@ local function bindDoc(source, binded) if not source.bindDocs then source.bindDocs = {} end - source.bindDocs[#source.bindDocs+1] = doc + source.bindDocs[#source.bindDocs + 1] = doc + if source.args then + for _, arg in ipairs(source.args) do + if arg[1] == doc.param[1] then + bindDocWithSource(doc, arg) + break + end + end + end end elseif doc.type == 'doc.vararg' then if source.type == '...' then |