diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2021-03-25 20:32:48 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2021-03-27 15:16:23 +0800 |
commit | 7d3cb7a0c80a52024c2545bd946f4d2a2f44c70f (patch) | |
tree | 652747460f6152ea2d4a4c9896e8ddf523461484 /script/config.lua | |
parent | 1dbf4ed28a095013837ecbbc0c7c1ba0e7ebacfa (diff) | |
download | lua-language-server-7d3cb7a0c80a52024c2545bd946f4d2a2f44c70f.zip |
#462 set `Lua.telemetry.enable` default to nil
Diffstat (limited to 'script/config.lua')
-rw-r--r-- | script/config.lua | 9 |
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)}, } } |