summaryrefslogtreecommitdiff
path: root/script-beta/core/hover/class.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-11-28 20:35:19 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-11-28 20:35:19 +0800
commita64957132d5c9ecf6c66003ff028d68772d1aa1f (patch)
tree2df5dee56cd1166b1c87c9f62ad3e268dafe48d6 /script-beta/core/hover/class.lua
parent1038520109da932c2e648da6ffa9bf25d36944b8 (diff)
downloadlua-language-server-a64957132d5c9ecf6c66003ff028d68772d1aa1f.zip
hover 显示 table
Diffstat (limited to 'script-beta/core/hover/class.lua')
-rw-r--r--script-beta/core/hover/class.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/script-beta/core/hover/class.lua b/script-beta/core/hover/class.lua
index 6d28ee8a..be7b3995 100644
--- a/script-beta/core/hover/class.lua
+++ b/script-beta/core/hover/class.lua
@@ -5,7 +5,14 @@ local function getClass(source, deep)
return nil
end
local class = vm.eachField(source, function (info)
- if info.key == 's|type' or info.key == 's|__name' or info.key == 's|name' then
+ if not info.key then
+ return
+ end
+ local lkey = info.key:lower()
+ if lkey == 's|type'
+ or lkey == 's|__name'
+ or lkey == 's|name'
+ or lkey == 's|class' then
if info.value and info.value.type == 'string' then
return info.value[1]
end