summaryrefslogtreecommitdiff
path: root/server/src/matcher
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-12 16:14:15 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-12 16:14:15 +0800
commitd1d6456378664a36a99094ddeb6b0c28f0449d72 (patch)
tree85e4e6c5cee6c730db9fe45667b05cb16d916753 /server/src/matcher
parentfa0f8b12d5e6d15bd3a3fdb994c20d2fce2a1fbf (diff)
downloadlua-language-server-d1d6456378664a36a99094ddeb6b0c28f0449d72.zip
恢复hover
Diffstat (limited to 'server/src/matcher')
-rw-r--r--server/src/matcher/hover.lua10
1 files changed, 3 insertions, 7 deletions
diff --git a/server/src/matcher/hover.lua b/server/src/matcher/hover.lua
index 9faa426b..12d599b3 100644
--- a/server/src/matcher/hover.lua
+++ b/server/src/matcher/hover.lua
@@ -160,17 +160,13 @@ local function buildTableHover(lib, fullKey)
]]):format(title, tip, field)
end
-return function (results, pos)
- local result = findResult(results, pos)
+return function (vm, pos)
+ local result = findResult(vm.results, pos)
if not result then
return nil
end
- if result.type ~= 'var' then
- return nil
- end
- local var = result.var
- local lib, fullKey, oo = findLib(var)
+ local lib, fullKey, oo = findLib(result.object)
if not lib then
return nil
end