summaryrefslogtreecommitdiff
path: root/server/src/core/hover
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-10-21 16:26:13 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-10-21 16:26:13 +0800
commit6e447f52bb9cf25730115b3baa7989ff95273471 (patch)
tree9e6683871ef269554ee225b2c672b43a4afacf67 /server/src/core/hover
parent49566afd015200c867f673dbe04f97dc241cc4be (diff)
downloadlua-language-server-6e447f52bb9cf25730115b3baa7989ff95273471.zip
#101 signature 额外显示完整的label
Diffstat (limited to 'server/src/core/hover')
-rw-r--r--server/src/core/hover/emmy_function.lua6
-rw-r--r--server/src/core/hover/function.lua6
-rw-r--r--server/src/core/hover/lib_function.lua6
3 files changed, 12 insertions, 6 deletions
diff --git a/server/src/core/hover/emmy_function.lua b/server/src/core/hover/emmy_function.lua
index 36fd4e90..e14e88c5 100644
--- a/server/src/core/hover/emmy_function.lua
+++ b/server/src/core/hover/emmy_function.lua
@@ -125,13 +125,15 @@ return function (name, emmy, object, select)
local enum, rawEnum = buildEnum(emmy)
local tip = emmy.description
local headLen = #('function %s('):format(name)
- local title = ('function %s(%s)%s'):format(name, argStr, returns)
+ 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,
+ label = title .. returns,
+ title = title,
+ returns = returns,
description = tip,
enum = enum,
rawEnum = rawEnum,
diff --git a/server/src/core/hover/function.lua b/server/src/core/hover/function.lua
index df26cd40..25796d60 100644
--- a/server/src/core/hover/function.lua
+++ b/server/src/core/hover/function.lua
@@ -229,13 +229,15 @@ return function (name, func, object, select)
local comment = getComment(func)
local overloads = getOverLoads(name, func, object, select)
local headLen = #('function %s('):format(name)
- local title = ('function %s(%s)%s'):format(name, argStr, returns)
+ 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,
+ label = title .. returns,
+ title = title,
+ returns = returns,
description = comment,
enum = enum,
rawEnum = rawEnum,
diff --git a/server/src/core/hover/lib_function.lua b/server/src/core/hover/lib_function.lua
index 09b1e47b..3c693961 100644
--- a/server/src/core/hover/lib_function.lua
+++ b/server/src/core/hover/lib_function.lua
@@ -208,13 +208,15 @@ return function (name, lib, object, select)
local tip = lib.description
local doc = buildDoc(lib)
local headLen = #('function %s('):format(name)
- local title = ('function %s(%s)%s'):format(name, argStr, returns)
+ 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,
+ label = title .. returns,
+ title = title,
+ returns = returns,
description = tip,
enum = enum,
rawEnum = rawEnum,