diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2020-05-30 14:59:38 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2020-05-30 14:59:38 +0800 |
commit | 30d1ac31b34ea50f3065e64a8483ad09a44b4c58 (patch) | |
tree | 35ab4559866b6d1f7a2ca1259f536e6ee8779842 /script-beta/vm/getLibrary.lua | |
parent | 5ad119e5848e3878ed37f58f71750bc4a17720a5 (diff) | |
download | lua-language-server-30d1ac31b34ea50f3065e64a8483ad09a44b4c58.zip |
library table 的hover
Diffstat (limited to 'script-beta/vm/getLibrary.lua')
-rw-r--r-- | script-beta/vm/getLibrary.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/script-beta/vm/getLibrary.lua b/script-beta/vm/getLibrary.lua index 8088917a..2af94440 100644 --- a/script-beta/vm/getLibrary.lua +++ b/script-beta/vm/getLibrary.lua @@ -6,6 +6,10 @@ local function checkStdLibrary(source) if source.library then return source end + if source.type ~= 'getglobal' + and source.type ~= 'setglobal' then + return + end local name = guide.getName(source) if not name then return nil @@ -29,6 +33,10 @@ end local function getNodeAsTable(source) local node = source.node + if node.type ~= 'getglobal' + and node.type ~= 'setglobal' then + return + end local name = guide.getName(node) return getLibInNode(source, library.global[name]) end |