summaryrefslogtreecommitdiff
path: root/script/core/diagnostics/undefined-global.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-07 21:27:45 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-07 21:27:45 +0800
commit680e6c9848a6e5f43ccce11561ec98839822bdea (patch)
tree829e587428002e9fdd3f82364c39490d2c3f0c24 /script/core/diagnostics/undefined-global.lua
parent5762f1bdc412a128489f0ad27124193fedfb13e9 (diff)
downloadlua-language-server-680e6c9848a6e5f43ccce11561ec98839822bdea.zip
cleanup
Diffstat (limited to 'script/core/diagnostics/undefined-global.lua')
-rw-r--r--script/core/diagnostics/undefined-global.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/script/core/diagnostics/undefined-global.lua b/script/core/diagnostics/undefined-global.lua
index bd0aae69..7804aeee 100644
--- a/script/core/diagnostics/undefined-global.lua
+++ b/script/core/diagnostics/undefined-global.lua
@@ -4,6 +4,7 @@ local lang = require 'language'
local config = require 'config'
local guide = require 'parser.guide'
local await = require 'await'
+local util = require 'utility'
local requireLike = {
['include'] = true,
@@ -19,7 +20,7 @@ return function (uri, callback)
return
end
- local dglobals = config.get(uri, 'Lua.diagnostics.globals')
+ local dglobals = util.arrayToHash(config.get(uri, 'Lua.diagnostics.globals'))
local rspecial = config.get(uri, 'Lua.runtime.special')
local cache = {}