summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2018-12-13 21:03:44 +0800
committer最萌小汐 <sumneko@hotmail.com>2018-12-13 21:03:44 +0800
commitf1da693a59a223c781c757cf22836b99f28735d6 (patch)
treea21a2ce621bddf065c423bfe0925dab850643186
parentea6bf371230b12e478139afb3730c7aa9d5edcd9 (diff)
downloadlua-language-server-f1da693a59a223c781c757cf22836b99f28735d6.zip
大量使用同一个全局变量名不提示
-rw-r--r--server/src/matcher/diagnostics.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/server/src/matcher/diagnostics.lua b/server/src/matcher/diagnostics.lua
index f3aeb9c4..9f3ed7c3 100644
--- a/server/src/matcher/diagnostics.lua
+++ b/server/src/matcher/diagnostics.lua
@@ -36,6 +36,9 @@ local function searchUndefinedGlobal(results, callback)
goto NEXT_VAR
end
end
+ if #field >= 3 then
+ goto NEXT_VAR
+ end
for _, info in ipairs(field) do
if info.type == 'set' then
goto NEXT_VAR