diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-11-09 21:11:00 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-11-09 21:11:00 +0800 |
commit | 6446cf30edaf099d338859b9eb858d2a1058e542 (patch) | |
tree | b6af0054092359d84c09563eb189436a5ce65fd4 /script-beta | |
parent | 19e05519b9bd0ec913e4b19913fb5f8288102021 (diff) | |
download | lua-language-server-6446cf30edaf099d338859b9eb858d2a1058e542.zip |
return 支持命名
Diffstat (limited to 'script-beta')
-rw-r--r-- | script-beta/core/hover/return.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/script-beta/core/hover/return.lua b/script-beta/core/hover/return.lua index 589b86b4..a6058133 100644 --- a/script-beta/core/hover/return.lua +++ b/script-beta/core/hover/return.lua @@ -108,7 +108,8 @@ local function asFunction(source) end if #types > 0 or rtn[1] then local tp = mergeTypes(types) or 'any' - line[#line+1] = ('%s%s'):format( + line[#line+1] = ('%s%s%s'):format( + rtn[1].name and (rtn[1].name[1] .. ': ') or '', tp, rtn[1].optional and '?' or '' ) |