summaryrefslogtreecommitdiff
path: root/server-beta/src/core
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2019-11-08 11:44:04 +0800
committer最萌小汐 <sumneko@hotmail.com>2019-11-08 11:44:04 +0800
commit444851fc1adb2fe3a0f952807cb4b644e18790c1 (patch)
tree722586a59027734fbba91678e51d82061c3a923b /server-beta/src/core
parentd2b9dee8ce0ae345e4efd43c112bb3efd4071888 (diff)
downloadlua-language-server-444851fc1adb2fe3a0f952807cb4b644e18790c1.zip
修正一些bug
Diffstat (limited to 'server-beta/src/core')
-rw-r--r--server-beta/src/core/diagnostics/global-in-nil-env.lua2
-rw-r--r--server-beta/src/core/diagnostics/init.lua3
2 files changed, 3 insertions, 2 deletions
diff --git a/server-beta/src/core/diagnostics/global-in-nil-env.lua b/server-beta/src/core/diagnostics/global-in-nil-env.lua
index 72375ea5..d8cc0075 100644
--- a/server-beta/src/core/diagnostics/global-in-nil-env.lua
+++ b/server-beta/src/core/diagnostics/global-in-nil-env.lua
@@ -50,7 +50,7 @@ return function (uri, callback)
finish = source.finish,
uri = uri,
message = lang.script.DIAG_GLOBAL_IN_NIL_ENV,
- relative = {
+ related = {
{
start = ok.start,
finish = ok.finish,
diff --git a/server-beta/src/core/diagnostics/init.lua b/server-beta/src/core/diagnostics/init.lua
index 8b6167cc..2972694d 100644
--- a/server-beta/src/core/diagnostics/init.lua
+++ b/server-beta/src/core/diagnostics/init.lua
@@ -7,8 +7,9 @@ local function check(uri, name, level, results)
return
end
level = config.config.diagnostics.severity[name] or level
+ local severity = define.DiagnosticSeverity[level]
require('core.diagnostics.' .. name)(uri, function (result)
- result.level = level or result.level
+ result.level = severity or result.level
result.code = name
results[#results+1] = result
end, name)