summaryrefslogtreecommitdiff
path: root/script-beta/vm/getClass.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2020-05-30 14:59:38 +0800
committer最萌小汐 <sumneko@hotmail.com>2020-05-30 14:59:38 +0800
commit30d1ac31b34ea50f3065e64a8483ad09a44b4c58 (patch)
tree35ab4559866b6d1f7a2ca1259f536e6ee8779842 /script-beta/vm/getClass.lua
parent5ad119e5848e3878ed37f58f71750bc4a17720a5 (diff)
downloadlua-language-server-30d1ac31b34ea50f3065e64a8483ad09a44b4c58.zip
library table 的hover
Diffstat (limited to 'script-beta/vm/getClass.lua')
-rw-r--r--script-beta/vm/getClass.lua5
1 files changed, 5 insertions, 0 deletions
diff --git a/script-beta/vm/getClass.lua b/script-beta/vm/getClass.lua
index 309a7693..45052561 100644
--- a/script-beta/vm/getClass.lua
+++ b/script-beta/vm/getClass.lua
@@ -5,6 +5,11 @@ local function getClass(source, classes, deep)
if deep > 3 then
return
end
+ local lib = vm.getLibrary(source)
+ if lib and lib.type == 'table' then
+ classes[#classes+1] = lib.name
+ return
+ end
local value = guide.getObjectValue(source) or source
vm.eachField(value, function (src)
local key = vm.getKeyName(src)