summaryrefslogtreecommitdiff
path: root/script/config.lua
diff options
context:
space:
mode:
author最萌小汐 <sumneko@hotmail.com>2021-03-25 20:32:48 +0800
committer最萌小汐 <sumneko@hotmail.com>2021-03-27 15:16:23 +0800
commit7d3cb7a0c80a52024c2545bd946f4d2a2f44c70f (patch)
tree652747460f6152ea2d4a4c9896e8ddf523461484 /script/config.lua
parent1dbf4ed28a095013837ecbbc0c7c1ba0e7ebacfa (diff)
downloadlua-language-server-7d3cb7a0c80a52024c2545bd946f4d2a2f44c70f.zip
#462 set `Lua.telemetry.enable` default to nil
Diffstat (limited to 'script/config.lua')
-rw-r--r--script/config.lua9
1 files changed, 8 insertions, 1 deletions
diff --git a/script/config.lua b/script/config.lua
index 5273e0cd..effd3016 100644
--- a/script/config.lua
+++ b/script/config.lua
@@ -22,6 +22,13 @@ local function String(v)
return true, tostring(v)
end
+local function Nil(v)
+ if type(v) == 'nil' then
+ return true, nil
+ end
+ return false
+end
+
local function Str2Hash(sep)
return function (v)
if type(v) == 'string' then
@@ -186,7 +193,7 @@ local ConfigTemplate = {
progressBar = {true, Boolean},
},
telemetry = {
- enable = {true, Boolean},
+ enable = {nil, Or(Boolean, Nil)},
}
}