diff options
-rw-r--r-- | doc/en-us/config.md | 18 | ||||
-rw-r--r-- | doc/pt-br/config.md | 22 | ||||
-rw-r--r-- | doc/zh-cn/config.md | 22 | ||||
-rw-r--r-- | doc/zh-tw/config.md | 18 | ||||
-rw-r--r-- | tools/configuration.lua | 6 |
5 files changed, 12 insertions, 74 deletions
diff --git a/doc/en-us/config.md b/doc/en-us/config.md index dab1a456..2d519824 100644 --- a/doc/en-us/config.md +++ b/doc/en-us/config.md @@ -2161,22 +2161,6 @@ integer 500 ``` -# workspace.supportScheme - -Provide language server for the Lua files of the following scheme. - -## type - -```ts -Array<string> -``` - -## default - -```jsonc -["file","untitled","git"] -``` - # workspace.useGitIgnore Ignore files list in `.gitignore` . @@ -2207,4 +2191,4 @@ Array<string> ```jsonc [] -``` +```
\ No newline at end of file diff --git a/doc/pt-br/config.md b/doc/pt-br/config.md index 4682fa0d..24cf8d3b 100644 --- a/doc/pt-br/config.md +++ b/doc/pt-br/config.md @@ -698,7 +698,7 @@ object<string, string> ```jsonc { /* - 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` + 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` */ "ambiguity-1": "Any", /* @@ -946,7 +946,7 @@ object<string, string> ```jsonc { /* - 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` + 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` */ "ambiguity-1": "Warning", /* @@ -2161,22 +2161,6 @@ integer 500 ``` -# workspace.supportScheme - -Provide language server for the Lua files of the following scheme. - -## type - -```ts -Array<string> -``` - -## default - -```jsonc -["file","untitled","git"] -``` - # workspace.useGitIgnore Ignore files list in `.gitignore` . @@ -2207,4 +2191,4 @@ Array<string> ```jsonc [] -``` +```
\ No newline at end of file diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 6bf64e3e..991932b6 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -698,7 +698,7 @@ object<string, string> ```jsonc { /* - 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` + 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` */ "ambiguity-1": "Any", /* @@ -945,7 +945,7 @@ object<string, string> ```jsonc { /* - 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` + 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` */ "ambiguity-1": "Warning", /* @@ -2160,22 +2160,6 @@ integer 500 ``` -# workspace.supportScheme - -为以下 scheme 的lua文件提供语言服务。 - -## type - -```ts -Array<string> -``` - -## default - -```jsonc -["file","untitled","git"] -``` - # workspace.useGitIgnore 忽略 `.gitignore` 中列举的文件。 @@ -2206,4 +2190,4 @@ Array<string> ```jsonc [] -``` +```
\ No newline at end of file diff --git a/doc/zh-tw/config.md b/doc/zh-tw/config.md index 8084374b..83cef315 100644 --- a/doc/zh-tw/config.md +++ b/doc/zh-tw/config.md @@ -2160,22 +2160,6 @@ integer 500 ``` -# workspace.supportScheme - -為以下 `scheme` 的lua檔案提供語言伺服。 - -## type - -```ts -Array<string> -``` - -## default - -```jsonc -["file","untitled","git"] -``` - # workspace.useGitIgnore 忽略 `.gitignore` 中列舉的檔案。 @@ -2206,4 +2190,4 @@ Array<string> ```jsonc [] -``` +```
\ No newline at end of file diff --git a/tools/configuration.lua b/tools/configuration.lua index b152927f..10bf6e08 100644 --- a/tools/configuration.lua +++ b/tools/configuration.lua @@ -32,8 +32,10 @@ local function getDefault(temp) if default == nil and temp.hasDefault then default = json.null end - if type(default) == 'table' and getType(temp) == 'object' then - setmetatable(default, json.object) + if type(default) == 'table' + and not next(default) + and getType(temp) == 'object' then + default = json.createEmptyObject() end return default end |