From 6e447f52bb9cf25730115b3baa7989ff95273471 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Mon, 21 Oct 2019 16:26:13 +0800 Subject: =?UTF-8?q?#101=20signature=20=E9=A2=9D=E5=A4=96=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=AE=8C=E6=95=B4=E7=9A=84label?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/src/core/hover/emmy_function.lua | 6 ++++-- server/src/core/hover/function.lua | 6 ++++-- server/src/core/hover/lib_function.lua | 6 ++++-- 3 files changed, 12 insertions(+), 6 deletions(-) (limited to 'server/src/core/hover') 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, -- cgit v1.2.3