diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-10-21 21:42:06 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-10-21 21:42:06 +0800 |
commit | 079847053a3020600a9fd0c35e12a9f7e8d57f16 (patch) | |
tree | a991917bef281a4ecab8356634c678292ea13128 /server/src/core/hover/function.lua | |
parent | 736373ad83a7505aa2f088c889c45a518695e571 (diff) | |
download | lua-language-server-079847053a3020600a9fd0c35e12a9f7e8d57f16.zip |
简化 signature
Diffstat (limited to 'server/src/core/hover/function.lua')
-rw-r--r-- | server/src/core/hover/function.lua | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/server/src/core/hover/function.lua b/server/src/core/hover/function.lua index 25796d60..8796be57 100644 --- a/server/src/core/hover/function.lua +++ b/server/src/core/hover/function.lua @@ -228,15 +228,10 @@ return function (name, func, object, select) local enum, rawEnum = buildEnum(func) local comment = getComment(func) local overloads = getOverLoads(name, func, object, select) - local headLen = #('function %s('):format(name) - local title = ('function %s(%s)'):format(name, argStr) - if argLabel then - argLabel[1] = argLabel[1] + headLen - argLabel[2] = argLabel[2] + headLen - end return { - label = title .. returns, - title = title, + label = ('function %s(%s)%s'):format(name, argStr, returns), + name = name, + argStr = argStr, returns = returns, description = comment, enum = enum, |