Skip to content

Commit 449a151

Browse files
authored
Pad return type annotations when required.
Place a space between `---` and `@return` when generating documentation for a function on a line like `--- `. This mimics how `@param` documentation is generated.
1 parent f836d90 commit 449a151

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

script/core/completion/completion.lua

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2192,7 +2192,8 @@ local function buildluaDocOfFunction(func, pad)
21922192
end
21932193
for _, rtn in ipairs(returns) do
21942194
index = index + 1
2195-
buf[#buf+1] = ('---@return ${%d:%s}'):format(
2195+
buf[#buf+1] = ('---%s@return ${%d:%s}'):format(
2196+
pad and ' ' or '',
21962197
index,
21972198
rtn
21982199
)

0 commit comments

Comments
 (0)