summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/table.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-08-17 19:02:01 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-08-17 19:02:01 +0800
commite8e5e00ff910bbbd7729d473198eff92e7581e64 (patch)
treebbc8adf49ed195219acb6df53dad783487889762 /script-beta/core/hover/table.lua
parent3e4411e10f8c0ebd10341450edd6c868866d04cb (diff)
downloadlua-language-server-e8e5e00ff910bbbd7729d473198eff92e7581e64.zip
优化性能
Diffstat (limited to 'script-beta/core/hover/table.lua')
-rw-r--r--script-beta/core/hover/table.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/script-beta/core/hover/table.lua b/script-beta/core/hover/table.lua
index 97209a4f..f16eed9b 100644
--- a/script-beta/core/hover/table.lua
+++ b/script-beta/core/hover/table.lua
@@ -12,7 +12,7 @@ local function getKey(src)
if class then
return ('[%s]'):format(class)
end
- local tp = vm.getType(src.index)
+ local tp = vm.getInferType(src.index)
if tp then
return ('[%s]'):format(tp)
end
@@ -36,9 +36,9 @@ local function getField(src)
or src.parent.type == 'getindex' then
src = src.parent
end
- local tp = vm.getType(src)
+ local tp = vm.getInferType(src)
local class = vm.getClass(src)
- local literal = vm.getLiteral(src)
+ local literal = vm.getInferLiteral(src)
local key = getKey(src)
if type(literal) == 'string' and #literal >= 50 then
literal = literal:sub(1, 47) .. '...'