summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-27 09:54:42 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-27 09:54:42 +0800
commit87af08f8a72cc285421d8df19501c6529541f958 (patch)
tree1f2938850c9306149e916f01cfdb4c80677fe3f4 /server/src
parent419bc25655554ebe5f4b5d1c143e1f0c2da82451 (diff)
downloadlua-language-server-87af08f8a72cc285421d8df19501c6529541f958.zip
非函数值找不到名字时,使用调用方的名字
Diffstat (limited to 'server/src')
-rw-r--r--server/src/matcher/hover.lua4
1 files changed, 3 insertions, 1 deletions
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua
index d2e7dd9c..09b2e071 100644
--- a/server/src/matcher/hover.lua
+++ b/server/src/matcher/hover.lua
@@ -181,8 +181,10 @@ local function buildValueName(result, source)
key = ('%q'):format(declarat[1])
elseif declarat.type == 'number' or declarat.type == 'boolean' then
key = tostring(declarat[1])
- else
+ elseif func.type == 'function' then
key = ''
+ else
+ key = result.key
end
local parentName = declarat.parentName