Skip to content

Commit

Permalink
#352 split multi description
Browse files Browse the repository at this point in the history
  • Loading branch information
sumneko committed Feb 2, 2021
1 parent 236e20b commit 295e52b
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions script/core/hover/description.lua
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ local function getFunctionComment(source)
end
end
end
elseif doc.type == 'doc.overload' then
comments[#comments+1] = '---'
end
end
comments = table.concat(comments, "\n\n")
Expand Down
23 changes: 23 additions & 0 deletions test/crossfile/hover.lua
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,29 @@ comment3]]
}}


TEST {{ path = 'a.lua', content = '', }, {
path = 'b.lua',
content = [[
---@param arg3 integer comment3
---@overload fun(arg3)
---@param arg1 integer comment1
---@param arg2 integer comment2
---@return boolean
function <?f?>(arg1, arg2) end
]]
},
hover = {
label = EXISTS,
name = 'f',
description = [[
@*param* `arg3` — comment3
---
@*param* `arg1` — comment1
@*param* `arg2` — comment2]]
}}


TEST {{ path = 'a.lua', content = '', }, {
path = 'b.lua',
content = [[
Expand Down

0 comments on commit 295e52b

Please sign in to comment.