summaryrefslogtreecommitdiff
path: root/server/src/core/hover/function.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-21 21:42:06 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-21 21:42:06 +0800
commit079847053a3020600a9fd0c35e12a9f7e8d57f16 (patch)
treea991917bef281a4ecab8356634c678292ea13128 /server/src/core/hover/function.lua
parent736373ad83a7505aa2f088c889c45a518695e571 (diff)
downloadlua-language-server-079847053a3020600a9fd0c35e12a9f7e8d57f16.zip
简化 signature
Diffstat (limited to 'server/src/core/hover/function.lua')
-rw-r--r--server/src/core/hover/function.lua11
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,