diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-06-07 20:19:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-06-07 20:19:13 +0800 |
commit | 3750bc297b35615510e9f3f0c3a850baf78a44dc (patch) | |
tree | 7bc9b2138b5652feeb9f406a36563f4408fee638 /script/core/diagnostics/undefined-global.lua | |
parent | 664b740fa40b22180f5055a543c465cb504290cd (diff) | |
download | lua-language-server-3750bc297b35615510e9f3f0c3a850baf78a44dc.zip |
update
Diffstat (limited to 'script/core/diagnostics/undefined-global.lua')
-rw-r--r-- | script/core/diagnostics/undefined-global.lua | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/script/core/diagnostics/undefined-global.lua b/script/core/diagnostics/undefined-global.lua index faf5f150..825b14f1 100644 --- a/script/core/diagnostics/undefined-global.lua +++ b/script/core/diagnostics/undefined-global.lua @@ -29,6 +29,10 @@ return function (uri, callback) if config.config.runtime.special[key] then return end + local node = src.node + if node.tag ~= '_ENV' then + return + end if #vm.getDefs(src) == 0 then local message = lang.script('DIAG_UNDEF_GLOBAL', key) if requireLike[key:lower()] then |