summaryrefslogtreecommitdiff
path: root/server/src/core/hover
diff options
context:
space:
mode:
authorunknown <sumnekosun@intranet.123u.com>2019-04-02 17:09:56 +0800
committerunknown <sumnekosun@intranet.123u.com>2019-04-02 17:09:56 +0800
commitd283727cffff43312e5129801e265c2957d507d6 (patch)
tree93333303de1715e6c2754213d6721bdcfcf73a22 /server/src/core/hover
parent43e0d5819011e069893ee9f05eba2fc90d1b4bf5 (diff)
downloadlua-language-server-d283727cffff43312e5129801e265c2957d507d6.zip
函数重新从全局查找
Diffstat (limited to 'server/src/core/hover')
-rw-r--r--server/src/core/hover/hover.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/server/src/core/hover/hover.lua b/server/src/core/hover/hover.lua
index f09bfce4..dfaeed35 100644
--- a/server/src/core/hover/hover.lua
+++ b/server/src/core/hover/hover.lua
@@ -177,7 +177,7 @@ end
local function hoverAsValue(source, lsp, select)
local lib, fullkey = findLib(source)
- local value = source:bindValue()
+ local value = source:findValue()
local name = fullkey or buildValueName(source)
local hover
@@ -186,7 +186,8 @@ local function hoverAsValue(source, lsp, select)
if lib then
hover = getFunctionHoverAsLib(name, lib, object, select)
else
- hover = getFunctionHover(name, value:getFunction(), object, select)
+ local func = value:getFunction()
+ hover = getFunctionHover(name, func, object, select)
end
else
hover = getValueHover(source, name, value, lib)