From 449a151ec5214df6c567e27b6084db9e03a4aeaf Mon Sep 17 00:00:00 2001 From: Clay Sweetser Date: Fri, 29 Dec 2023 19:15:20 -0500 Subject: 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. --- script/core/completion/completion.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'script') diff --git a/script/core/completion/completion.lua b/script/core/completion/completion.lua index b7d4650c..acb3adbe 100644 --- a/script/core/completion/completion.lua +++ b/script/core/completion/completion.lua @@ -2192,7 +2192,8 @@ local function buildluaDocOfFunction(func, pad) end for _, rtn in ipairs(returns) do index = index + 1 - buf[#buf+1] = ('---@return ${%d:%s}'):format( + buf[#buf+1] = ('---%s@return ${%d:%s}'):format( + pad and ' ' or '', index, rtn ) -- cgit v1.2.3