summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2022-06-08 19:16:54 +0800
committer最萌小汐 <sumneko@hotmail.com>2022-06-08 19:16:54 +0800
commitf9310f9ca75c0e75a382b6b3806e5273350bab31 (patch)
treea8e384023bf9d54850b6fdaa76a7a24a0d084ebf
parent5241f282f8c61e9ab012335119c47f032d6bc616 (diff)
downloadlua-language-server-f9310f9ca75c0e75a382b6b3806e5273350bab31.zip
update config
-rw-r--r--script/config/template.lua1
-rw-r--r--tools/configuration.lua6
2 files changed, 7 insertions, 0 deletions
diff --git a/script/config/template.lua b/script/config/template.lua
index d22679a2..bea1dfa1 100644
--- a/script/config/template.lua
+++ b/script/config/template.lua
@@ -304,6 +304,7 @@ local template = {
>> {},
['Lua.spell.dict'] = Type.Array(Type.String),
['Lua.telemetry.enable'] = Type.Or(Type.Boolean >> false, Type.Nil) >> nil,
+ ['Lua.misc.parameters'] = Type.Array(Type.String),
-- VSCode
['files.associations'] = Type.Hash(Type.String, Type.String),
diff --git a/tools/configuration.lua b/tools/configuration.lua
index b035737f..953d5990 100644
--- a/tools/configuration.lua
+++ b/tools/configuration.lua
@@ -1,5 +1,6 @@
local json = require 'json'
local template = require 'config.template'
+local util = require 'utility'
local function getType(temp)
if temp.name == 'Boolean' then
@@ -76,6 +77,9 @@ end
local config = {}
for name, temp in pairs(template) do
+ if not util.stringStartWith(name, 'Lua.') then
+ goto CONTINUE
+ end
config[name] = {
scope = 'resource',
type = getType(temp),
@@ -93,6 +97,8 @@ for name, temp in pairs(template) do
if temp.name == 'Hash' then
insertHash(config[name], temp)
end
+
+ ::CONTINUE::
end
config['Lua.telemetry.enable'].tags = { 'telemetry' }