summaryrefslogtreecommitdiff
path: root/script/core/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2023-03-08 21:17:43 +0800
committer最萌小汐 <sumneko@hotmail.com>2023-03-08 21:17:43 +0800
commit48a3aab6e3becb5127ad467964c44f19187cac35 (patch)
tree87cbce0f6523c60100fbd69e4c9621120ba67d17 /script/core/diagnostics
parentf462813bee496adb2613389b0bfbb3e558617916 (diff)
downloadlua-language-server-48a3aab6e3becb5127ad467964c44f19187cac35.zip
don't treat `_ENV` as param
fix #1715
Diffstat (limited to 'script/core/diagnostics')
-rw-r--r--script/core/diagnostics/global-in-nil-env.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/core/diagnostics/global-in-nil-env.lua b/script/core/diagnostics/global-in-nil-env.lua
index e154080c..daf1f99d 100644
--- a/script/core/diagnostics/global-in-nil-env.lua
+++ b/script/core/diagnostics/global-in-nil-env.lua
@@ -13,6 +13,9 @@ return function (uri, callback)
if node.tag == '_ENV' then
return
end
+ if guide.isParam(node) then
+ return
+ end
if not node.value or node.value.type == 'nil' then
callback {