summaryrefslogtreecommitdiff
path: root/server/src
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-01-07 15:31:08 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-01-07 15:31:08 +0800
commita485d6698b906ab51fc5a498e0f88e2b474a7409 (patch)
tree6a79b77236226d0cc0a949ff4ced66836711099f /server/src
parentb7a45a477c7f3e5c20e14a649847147340e96abc (diff)
downloadlua-language-server-a485d6698b906ab51fc5a498e0f88e2b474a7409.zip
全局变量第一个字母大写就忽略
Diffstat (limited to 'server/src')
-rw-r--r--server/src/core/diagnostics.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/core/diagnostics.lua b/server/src/core/diagnostics.lua
index 6a87a25b..662711fb 100644
--- a/server/src/core/diagnostics.lua
+++ b/server/src/core/diagnostics.lua
@@ -48,7 +48,7 @@ local function searchUndefinedGlobal(results, callback)
if lIndex == 'log' or lIndex == 'arg' or lIndex == '' then
goto NEXT_VAR
end
- if not index:find '%l' then
+ if index:find '^_*%u' then
goto NEXT_VAR
end
for _, info in ipairs(field) do