summaryrefslogtreecommitdiff
path: root/server/test
diff options
context:
space:
mode:
Diffstat (limited to 'server/test')
-rw-r--r--server/test/build_package.lua23
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))