summaryrefslogtreecommitdiff
path: root/script/core/diagnostics
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-12-30 17:51:22 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-12-30 17:51:22 +0800
commitb1c20a1f24cc7e17d446b2ac4e4118c36173dc20 (patch)
treea55942645f0cbc5db38aad471ac92e2d5b4c7c8c /script/core/diagnostics
parenta555b92349e2ab07b9111a296618a69caa068032 (diff)
downloadlua-language-server-b1c20a1f24cc7e17d446b2ac4e4118c36173dc20.zip
update
Diffstat (limited to 'script/core/diagnostics')
-rw-r--r--script/core/diagnostics/deprecated.lua6
-rw-r--r--script/core/diagnostics/init.lua6
-rw-r--r--script/core/diagnostics/lowercase-global.lua2
-rw-r--r--script/core/diagnostics/undefined-global.lua4
4 files changed, 9 insertions, 9 deletions
diff --git a/script/core/diagnostics/deprecated.lua b/script/core/diagnostics/deprecated.lua
index 5fe36c42..1c248646 100644
--- a/script/core/diagnostics/deprecated.lua
+++ b/script/core/diagnostics/deprecated.lua
@@ -23,10 +23,10 @@ return function (uri, callback)
if not key then
return
end
- if config.get(nil, 'Lua.diagnostics.globals')[key] then
+ if config.get(uri, 'Lua.diagnostics.globals')[key] then
return
end
- if config.get(nil, 'Lua.runtime.special')[key] then
+ if config.get(uri, 'Lua.runtime.special')[key] then
return
end
end
@@ -83,7 +83,7 @@ return function (uri, callback)
end
table.sort(versions)
if #versions > 0 then
- message = ('%s(%s)'):format(message, lang.script('DIAG_DEFINED_VERSION', table.concat(versions, '/'), config.get(nil, 'Lua.runtime.version')))
+ message = ('%s(%s)'):format(message, lang.script('DIAG_DEFINED_VERSION', table.concat(versions, '/'), config.get(uri, 'Lua.runtime.version')))
end
end
cache[id] = {
diff --git a/script/core/diagnostics/init.lua b/script/core/diagnostics/init.lua
index 2a21302b..4e2a4976 100644
--- a/script/core/diagnostics/init.lua
+++ b/script/core/diagnostics/init.lua
@@ -20,13 +20,13 @@ table.sort(diagList, function (a, b)
end)
local function check(uri, name, results)
- if config.get(nil, 'Lua.diagnostics.disable')[name] then
+ if config.get(uri, 'Lua.diagnostics.disable')[name] then
return
end
- local level = config.get(nil, 'Lua.diagnostics.severity')[name]
+ local level = config.get(uri, 'Lua.diagnostics.severity')[name]
or define.DiagnosticDefaultSeverity[name]
- local neededFileStatus = config.get(nil, 'Lua.diagnostics.neededFileStatus')[name]
+ local neededFileStatus = config.get(uri, 'Lua.diagnostics.neededFileStatus')[name]
or define.DiagnosticDefaultNeededFileStatus[name]
if neededFileStatus == 'None' then
diff --git a/script/core/diagnostics/lowercase-global.lua b/script/core/diagnostics/lowercase-global.lua
index bd301c7f..d7032c13 100644
--- a/script/core/diagnostics/lowercase-global.lua
+++ b/script/core/diagnostics/lowercase-global.lua
@@ -24,7 +24,7 @@ return function (uri, callback)
end
local definedGlobal = {}
- for name in pairs(config.get(nil, 'Lua.diagnostics.globals')) do
+ for name in pairs(config.get(uri, 'Lua.diagnostics.globals')) do
definedGlobal[name] = true
end
diff --git a/script/core/diagnostics/undefined-global.lua b/script/core/diagnostics/undefined-global.lua
index 41a50d99..45fc390b 100644
--- a/script/core/diagnostics/undefined-global.lua
+++ b/script/core/diagnostics/undefined-global.lua
@@ -27,10 +27,10 @@ return function (uri, callback)
if not key then
return
end
- if config.get(nil, 'Lua.diagnostics.globals')[key] then
+ if config.get(uri, 'Lua.diagnostics.globals')[key] then
return
end
- if config.get(nil, 'Lua.runtime.special')[key] then
+ if config.get(uri, 'Lua.runtime.special')[key] then
return
end
local node = src.node