diff options
author | sumneko <sumneko@hotmail.com> | 2019-05-14 11:02:48 +0800 |
---|---|---|
committer | sumneko <sumneko@hotmail.com> | 2019-05-14 11:02:48 +0800 |
commit | 91df1468e72dff445539e868048285840efc4a9e (patch) | |
tree | a8865cfc32affeb534c68493359b9bdf4d5e3cd5 /server/test/build_package.lua | |
parent | efb8c6f705a940831fbdb8b7246ba6206ddf9220 (diff) | |
download | lua-language-server-91df1468e72dff445539e868048285840efc4a9e.zip |
#13 诊断等级的配置
Diffstat (limited to 'server/test/build_package.lua')
-rw-r--r-- | server/test/build_package.lua | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/server/test/build_package.lua b/server/test/build_package.lua index b68beb06..7a58487c 100644 --- a/server/test/build_package.lua +++ b/server/test/build_package.lua @@ -1,4 +1,5 @@ local json = require 'json' +local diagDefault = require 'constant.DiagnosticDefaultSeverity' local package = { name = "lua", @@ -71,6 +72,13 @@ local package = { items = "string", description = "%config.diagnostics.globals%" }, + ["Lua.diagnostics.severity"] = { + scope = "resource", + type = 'object', + description = "%config.diagnostics.severity", + title = "severity", + properties = {} + }, ["Lua.workspace.ignoreDir"] = { scope = "resource", type = "array", @@ -121,6 +129,21 @@ local package = { } } +local DiagSeverity = package.contributes.configuration.properties["Lua.diagnostics.severity"].properties +for name, level in pairs(diagDefault) do + DiagSeverity[name] = { + scope = 'resource', + type = 'string', + default = level, + enum = { + 'Error', + 'Warning', + 'Information', + 'Hint', + } + } +end + package.version = "0.9.2" io.save(ROOT:parent_path() / 'package.json', json.encode(package)) |