diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2024-01-10 10:29:42 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-10 10:29:42 +0800 |
commit | ded415e393cf77c27f1a053f914ea040b1a0955b (patch) | |
tree | 0b9ba6bb0f2054795420a21cb2e20cd6448615ec /script | |
parent | 9fd6f7ebb4e950e734f1f52f0e9c7de2581912aa (diff) | |
parent | 449a151ec5214df6c567e27b6084db9e03a4aeaf (diff) | |
download | lua-language-server-ded415e393cf77c27f1a053f914ea040b1a0955b.zip |
Merge pull request #2464 from Varriount/patch-1
Pad `return` type annotations when required.
Diffstat (limited to 'script')
-rw-r--r-- | script/core/completion/completion.lua | 3 |
1 files changed, 2 insertions, 1 deletions
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 ) |