Skip to content

Commit c62b62e

Browse files
committed
fix #1446
1 parent c273b04 commit c62b62e

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

changelog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* `FIX` [#1428](https://github.com/sumneko/lua-language-server/issues/1428)
88
* `FIX` [#1430](https://github.com/sumneko/lua-language-server/issues/1430)
99
* `FIX` [#1431](https://github.com/sumneko/lua-language-server/issues/1431)
10+
* `FIX` [#1446](https://github.com/sumneko/lua-language-server/issues/1446)
1011

1112
## 3.5.2
1213
`2022-8-1`

script/parser/luadoc.lua

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1697,7 +1697,15 @@ local function bindDoc(source, binded)
16971697
if not source.bindDocs then
16981698
source.bindDocs = {}
16991699
end
1700-
source.bindDocs[#source.bindDocs+1] = doc
1700+
source.bindDocs[#source.bindDocs + 1] = doc
1701+
if source.args then
1702+
for _, arg in ipairs(source.args) do
1703+
if arg[1] == doc.param[1] then
1704+
bindDocWithSource(doc, arg)
1705+
break
1706+
end
1707+
end
1708+
end
17011709
end
17021710
elseif doc.type == 'doc.vararg' then
17031711
if source.type == '...' then

test/hover/init.lua

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2137,7 +2137,6 @@ function test2()
21372137
3. integer
21382138
]]
21392139

2140-
do return end
21412140
TEST [[
21422141
---@param x number
21432142
---@return boolean

0 commit comments

Comments
 (0)