diff --git a/build-settings.lua b/build-settings.lua index 40e344e131a90d0b6be1d95707c7f16e6f4f6e70..33f5325481223809171fba8b9019a5a62357d6ad 100644 --- a/build-settings.lua +++ b/build-settings.lua @@ -7,7 +7,7 @@ package.path = package.path .. ';' .. rootPath .. 'server/script/?.lua' local json = require 'json-beautify' -local configuration = require 'package.configuration' +local configuration = require 'server.tools.configuration' local fsu = require 'fs-utility' local lloader = require 'locale-loader' diff --git a/package.nls.json b/package.nls.json index 20afba4265c7709b3f61eb7a74d7c3ab3cc29f88..929568db5895fb0782dede05bffd08403aecddf9 100644 --- a/package.nls.json +++ b/package.nls.json @@ -35,13 +35,16 @@ "config.diagnostics.duplicate-index": "Enable duplicate table index diagnostics.", "config.diagnostics.empty-block": "Enable empty code block diagnostics.", "config.diagnostics.enable": "Enable diagnostics.", - "config.diagnostics.files.Disable": "These files are not diagnosed.", - "config.diagnostics.files.Enable": "Always diagnose these files.", - "config.diagnostics.files.Opened": "Only when these files are opened will it be diagnosed.", "config.diagnostics.global-in-nil-env": "Enable cannot use global variables ( `_ENV` is set to `nil`) diagnostics.", "config.diagnostics.globals": "Defined global variables.", "config.diagnostics.ignoredFiles": "How to diagnose ignored files.", + "config.diagnostics.ignoredFiles.Disable": "These files are not diagnosed.", + "config.diagnostics.ignoredFiles.Enable": "Always diagnose these files.", + "config.diagnostics.ignoredFiles.Opened": "Only when these files are opened will it be diagnosed.", "config.diagnostics.libraryFiles": "How to diagnose files loaded via `Lua.workspace.library`.", + "config.diagnostics.libraryFiles.Disable": "These files are not diagnosed.", + "config.diagnostics.libraryFiles.Enable": "Always diagnose these files.", + "config.diagnostics.libraryFiles.Opened": "Only when these files are opened will it be diagnosed.", "config.diagnostics.lowercase-global": "Enable lowercase global variable definition diagnostics.", "config.diagnostics.neededFileStatus": "* Opened: only diagnose opened files\n* Any: diagnose all files\n* Disable: disable this diagnostic\n", "config.diagnostics.newfield-call": "在字面量表中,2行代码之间缺少分隔符,在语法上被解析为了一次索引操作", diff --git a/package.nls.pt-br.json b/package.nls.pt-br.json index f63bb62eff48a79cdb3a031a56db088ec3bc48e7..7736ec9a8b8c02bc761a2a52b349889576fdeada 100644 --- a/package.nls.pt-br.json +++ b/package.nls.pt-br.json @@ -35,13 +35,16 @@ "config.diagnostics.duplicate-index": "在字面量表中重复定义了索引", "config.diagnostics.empty-block": "空代码块", "config.diagnostics.enable": "Enable diagnostics.", - "config.diagnostics.files.Disable": "These files are not diagnosed.", - "config.diagnostics.files.Enable": "Always diagnose these files.", - "config.diagnostics.files.Opened": "Only when these files are opened will it be diagnosed.", "config.diagnostics.global-in-nil-env": "不能使用全局变量( `_ENV` 被设置为了 `nil`)", "config.diagnostics.globals": "Defined global variables.", "config.diagnostics.ignoredFiles": "How to diagnose ignored files.", + "config.diagnostics.ignoredFiles.Disable": "These files are not diagnosed.", + "config.diagnostics.ignoredFiles.Enable": "Always diagnose these files.", + "config.diagnostics.ignoredFiles.Opened": "Only when these files are opened will it be diagnosed.", "config.diagnostics.libraryFiles": "How to diagnose files loaded via `Lua.workspace.library`.", + "config.diagnostics.libraryFiles.Disable": "These files are not diagnosed.", + "config.diagnostics.libraryFiles.Enable": "Always diagnose these files.", + "config.diagnostics.libraryFiles.Opened": "Only when these files are opened will it be diagnosed.", "config.diagnostics.lowercase-global": "首字母小写的全局变量定义", "config.diagnostics.neededFileStatus": "* Opened: only diagnose opened files\n* Any: diagnose all files\n* Disable: disable this diagnostic\n", "config.diagnostics.newfield-call": "在字面量表中,2行代码之间缺少分隔符,在语法上被解析为了一次索引操作", diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index 32e6bb64b9e540cad154ce2fe5daad397085c093..baf4336f9d03e8ef11efba63b6792ff5f737bc8f 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -35,13 +35,16 @@ "config.diagnostics.duplicate-index": "在字面量表中重复定义了索引", "config.diagnostics.empty-block": "空代码块", "config.diagnostics.enable": "启用诊断。", - "config.diagnostics.files.Disable": "不诊断这些文件。", - "config.diagnostics.files.Enable": "总是诊断这些文件。", - "config.diagnostics.files.Opened": "只有打开这些文件时才会诊断。", "config.diagnostics.global-in-nil-env": "不能使用全局变量( `_ENV` 被设置为了 `nil`)", "config.diagnostics.globals": "已定义的全局变量。", "config.diagnostics.ignoredFiles": "如何诊断被忽略的文件。", + "config.diagnostics.ignoredFiles.Disable": "不诊断这些文件。", + "config.diagnostics.ignoredFiles.Enable": "总是诊断这些文件。", + "config.diagnostics.ignoredFiles.Opened": "只有打开这些文件时才会诊断。", "config.diagnostics.libraryFiles": "如何诊断通过 `Lua.workspace.library` 加载的文件。", + "config.diagnostics.libraryFiles.Disable": "不诊断这些文件。", + "config.diagnostics.libraryFiles.Enable": "总是诊断这些文件。", + "config.diagnostics.libraryFiles.Opened": "只有打开这些文件时才会诊断。", "config.diagnostics.lowercase-global": "首字母小写的全局变量定义", "config.diagnostics.neededFileStatus": "* Opened: 只诊断打开的文件\n* Any: 诊断任何文件\n* Disable: 禁用此诊断\n", "config.diagnostics.newfield-call": "在字面量表中,2行代码之间缺少分隔符,在语法上被解析为了一次索引操作", diff --git a/package.nls.zh-tw.json b/package.nls.zh-tw.json index 74832f74909c858c24f946547a1a5956c4b5267a..fde3774aca84eed8a774816bd4c5ca0b9951a2d8 100644 --- a/package.nls.zh-tw.json +++ b/package.nls.zh-tw.json @@ -35,13 +35,16 @@ "config.diagnostics.duplicate-index": "在字面常數表中重複定義了索引", "config.diagnostics.empty-block": "空程式碼區塊", "config.diagnostics.enable": "啟用診斷。", - "config.diagnostics.files.Disable": "不診斷這些檔案。", - "config.diagnostics.files.Enable": "總是診斷這些檔案。", - "config.diagnostics.files.Opened": "只有打開這些檔案時才會診斷。", "config.diagnostics.global-in-nil-env": "不能使用全域變數( `_ENV` 被設定為了 `nil`)", "config.diagnostics.globals": "已定義的全域變數。", "config.diagnostics.ignoredFiles": "如何診斷被忽略的檔案。", + "config.diagnostics.ignoredFiles.Disable": "不診斷這些檔案。", + "config.diagnostics.ignoredFiles.Enable": "總是診斷這些檔案。", + "config.diagnostics.ignoredFiles.Opened": "只有打開這些檔案時才會診斷。", "config.diagnostics.libraryFiles": "如何診斷透過 `Lua.workspace.library` 載入的檔案。", + "config.diagnostics.libraryFiles.Disable": "不診斷這些檔案。", + "config.diagnostics.libraryFiles.Enable": "總是診斷這些檔案。", + "config.diagnostics.libraryFiles.Opened": "只有打開這些檔案時才會診斷。", "config.diagnostics.lowercase-global": "首字母小寫的全域變數定義", "config.diagnostics.neededFileStatus": "* Opened: 只診斷打開的檔案\n* Any: 診斷任何檔案\n* Disable: 停用此診斷\n", "config.diagnostics.newfield-call": "在字面常數表中,2行程式碼之間缺少分隔符,在語法上被解析為了一次索引操作", diff --git a/package/configuration.lua b/package/configuration.lua deleted file mode 100644 index f53983950a0e2d95e4e748710924842b9ffa54d8..0000000000000000000000000000000000000000 --- a/package/configuration.lua +++ /dev/null @@ -1,618 +0,0 @@ -local const = require 'proto.define' -local json = require 'json' - -local config = { - ["Lua.runtime.version"] = { - scope = 'resource', - type = "string", - default = "Lua 5.4", - enum = { - "Lua 5.1", - "Lua 5.2", - "Lua 5.3", - "Lua 5.4", - "LuaJIT" - }, - markdownDescription = "%config.runtime.version%" - }, - ["Lua.runtime.path"] = { - scope = 'resource', - type = "array", - items = { - type = 'string', - }, - markdownDescription = "%config.runtime.path%", - default = { - "?.lua", - "?/init.lua", - } - }, - ["Lua.runtime.pathStrict"] = { - scope = 'resource', - type = "boolean", - markdownDescription = "%config.runtime.pathStrict%", - default = false, - }, - ["Lua.runtime.special"] = { - scope = 'resource', - type = 'object', - markdownDescription = '%config.runtime.special%', - additionalProperties = false, - patternProperties = { - ['.*'] = { - type = "string", - default = "require", - enum = { - '_G', - 'rawset', - 'rawget', - 'setmetatable', - 'require', - 'dofile', - 'loadfile', - 'pcall', - 'xpcall', - 'assert', - } - } - } - }, - ["Lua.runtime.unicodeName"] = { - scope = 'resource', - type = 'boolean', - default = false, - markdownDescription = "%config.runtime.unicodeName%" - }, - ["Lua.runtime.nonstandardSymbol"] = { - scope = 'resource', - type = 'array', - items = { - type = 'string', - enum = { - '//', '/**/', - '`', - '+=', '-=', '*=', '/=', - '||', '&&', '!', '!=', - 'continue', - } - }, - markdownDescription = "%config.runtime.nonstandardSymbol%" - }, - ["Lua.runtime.plugin"] = { - scope = 'resource', - type = "string", - default = "", - markdownDescription = "%config.runtime.plugin%" - }, - ["Lua.runtime.fileEncoding"] = { - scope = 'resource', - type = 'string', - default = 'utf8', - enum = { - "utf8", - "ansi", - "utf16le", - "utf16be", - }, - markdownDescription = '%config.runtime.fileEncoding%', - }, - ['Lua.runtime.builtin'] = { - scope = 'resource', - type = 'object', - additionalProperties = false, - properties = {}, - markdownDescription = '%config.runtime.builtin%', - }, - ["Lua.diagnostics.enable"] = { - scope = 'resource', - type = 'boolean', - default = true, - markdownDescription = "%config.diagnostics.enable%" - }, - ["Lua.diagnostics.disable"] = { - scope = 'resource', - type = "array", - items = { - type = 'string', - }, - markdownDescription = "%config.diagnostics.disable%" - }, - ["Lua.diagnostics.globals"] = { - scope = 'resource', - type = "array", - items = { - type = 'string', - }, - markdownDescription = "%config.diagnostics.globals%" - }, - ["Lua.diagnostics.severity"] = { - scope = 'resource', - type = 'object', - additionalProperties = false, - markdownDescription = "%config.diagnostics.severity%", - title = "severity", - properties = {} - }, - ["Lua.diagnostics.neededFileStatus"] = { - scope = 'resource', - type = 'object', - additionalProperties = false, - markdownDescription = "%config.diagnostics.neededFileStatus%", - title = "neededFileStatus", - properties = {} - }, - ["Lua.diagnostics.workspaceDelay"] = { - scope = 'resource', - type = "integer", - default = 3000, - markdownDescription = "%config.diagnostics.workspaceDelay%", - }, - ["Lua.diagnostics.workspaceRate"] = { - scope = 'resource', - type = "integer", - default = 100, - markdownDescription = "%config.diagnostics.workspaceRate%", - }, - ["Lua.diagnostics.libraryFiles"] = { - scope = 'resource', - type = "string", - default = "Opened", - enum = { - "Enable", - "Opened", - "Disable", - }, - markdownEnumDescriptions = { - "%config.diagnostics.files.Enable%", - "%config.diagnostics.files.Opened%", - "%config.diagnostics.files.Disable%", - }, - markdownDescription = "%config.diagnostics.libraryFiles%", - }, - ["Lua.diagnostics.ignoredFiles"] = { - scope = 'resource', - type = "string", - default = "Opened", - enum = { - "Enable", - "Opened", - "Disable", - }, - markdownEnumDescriptions = { - "%config.diagnostics.files.Enable%", - "%config.diagnostics.files.Opened%", - "%config.diagnostics.files.Disable%", - }, - markdownDescription = "%config.diagnostics.ignoredFiles%", - }, - ['Lua.diagnostics.disableScheme'] = { - scope = 'resource', - type = "array", - items = { - type = "string" - }, - default = { - 'git', - }, - markdownDescription = "%config.diagnostics.disableScheme%" - }, - ["Lua.workspace.ignoreDir"] = { - scope = 'resource', - type = "array", - items = { - type = 'string', - }, - markdownDescription = "%config.workspace.ignoreDir%", - default = { - ".vscode", - }, - }, - ["Lua.workspace.ignoreSubmodules"] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.workspace.ignoreSubmodules%" - }, - ["Lua.workspace.useGitIgnore"] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.workspace.useGitIgnore%" - }, - ["Lua.workspace.maxPreload"] = { - scope = 'resource', - type = "integer", - default = 5000, - markdownDescription = "%config.workspace.maxPreload%" - }, - ["Lua.workspace.preloadFileSize"] = { - scope = 'resource', - type = "integer", - default = 500, - markdownDescription = "%config.workspace.preloadFileSize%" - }, - ["Lua.workspace.library"] = { - scope = 'resource', - type = "array", - items = { - type = "string" - }, - markdownDescription = "%config.workspace.library%" - }, - ['Lua.workspace.checkThirdParty'] = { - scope = 'resource', - type = 'boolean', - default = true, - markdownDescription = "%config.workspace.checkThirdParty%" - }, - ["Lua.workspace.userThirdParty"] = { - scope = 'resource', - type = "array", - items = { - type = "string" - }, - markdownDescription = "%config.workspace.userThirdParty%" - }, - ['Lua.workspace.supportScheme'] = { - scope = 'resource', - type = "array", - items = { - type = "string" - }, - default = { - 'file', - 'untitled', - 'git', - }, - markdownDescription = "%config.workspace.supportScheme%" - }, - ["Lua.completion.enable"] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.completion.enable%" - }, - ["Lua.completion.callSnippet"] = { - scope = 'resource', - type = "string", - default = "Disable", - enum = { - "Disable", - "Both", - "Replace", - }, - markdownEnumDescriptions = { - "%config.completion.callSnippet.Disable%", - "%config.completion.callSnippet.Both%", - "%config.completion.callSnippet.Replace%", - }, - markdownDescription = "%config.completion.callSnippet%" - }, - ["Lua.completion.keywordSnippet"] = { - scope = 'resource', - type = "string", - default = "Replace", - enum = { - "Disable", - "Both", - "Replace", - }, - markdownEnumDescriptions = { - "%config.completion.keywordSnippet.Disable%", - "%config.completion.keywordSnippet.Both%", - "%config.completion.keywordSnippet.Replace%", - }, - markdownDescription = "%config.completion.keywordSnippet%" - }, - ['Lua.completion.displayContext'] = { - scope = 'resource', - type = "integer", - default = 0, - markdownDescription = "%config.completion.displayContext%", - }, - ['Lua.completion.workspaceWord'] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.completion.workspaceWord%" - }, - ['Lua.completion.showWord'] = { - scope = 'resource', - type = "string", - default = 'Fallback', - enum = { - "Enable", - "Fallback", - "Disable", - }, - markdownEnumDescriptions = { - "%config.completion.showWord.Enable%", - "%config.completion.showWord.Fallback%", - "%config.completion.showWord.Disable%", - }, - markdownDescription = "%config.completion.showWord%" - }, - ['Lua.completion.autoRequire'] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.completion.autoRequire%" - }, - ['Lua.completion.showParams'] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.completion.showParams%" - }, - ['Lua.completion.requireSeparator'] = { - scope = 'resource', - type = "string", - default = '.', - markdownDescription = "%config.completion.requireSeparator%" - }, - ['Lua.completion.postfix'] = { - scope = 'resource', - type = "string", - default = '@', - markdownDescription = "%config.completion.postfix%" - }, - ["Lua.semantic.enable"] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.semantic.enable%" - }, - ["Lua.semantic.variable"] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.semantic.variable%" - }, - ["Lua.semantic.annotation"] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.semantic.annotation%" - }, - ["Lua.semantic.keyword"] = { - scope = 'resource', - type = "boolean", - default = false, - markdownDescription = "%config.semantic.keyword%" - }, - ["Lua.signatureHelp.enable"] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.signatureHelp.enable%" - }, - ['Lua.hover.enable'] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.hover.enable%" - }, - ['Lua.hover.viewString'] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.hover.viewString%" - }, - ['Lua.hover.viewStringMax'] = { - scope = 'resource', - type = "integer", - default = 1000, - markdownDescription = "%config.hover.viewStringMax%" - }, - ['Lua.hover.viewNumber'] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.hover.viewNumber%" - }, - ['Lua.hover.previewFields'] = { - scope = 'resource', - type = "integer", - default = 20, - markdownDescription = "%config.hover.previewFields%" - }, - ['Lua.hover.enumsLimit'] = { - scope = 'resource', - type = "integer", - default = 5, - markdownDescription = "%config.hover.enumsLimit%" - }, - --["Lua.plugin.enable"] = { - -- scope = 'resource', - -- type = "boolean", - -- default = false, - -- markdownDescription = "%config.plugin.enable%" - --}, - --["Lua.plugin.path"] = { - -- scope = 'resource', - -- type = "string", - -- default = ".vscode/lua-plugin/*.lua", - -- markdownDescription = "%config.plugin.path%" - --}, - --["Lua.develop.enable"] = { - -- scope = 'resource', - -- type = "boolean", - -- default = false, - -- markdownDescription = "%config.develop.enable%" - --}, - --["Lua.develop.debuggerPort"] = { - -- scope = 'resource', - -- type = "integer", - -- default = 11412, - -- markdownDescription = "%config.develop.debuggerPort%" - --}, - --["Lua.develop.debuggerWait"] = { - -- scope = 'resource', - -- type = "boolean", - -- default = false, - -- markdownDescription = "%config.develop.debuggerWait%" - --}, - --['Lua.intelliSense.searchDepth'] = { - -- scope = 'resource', - -- type = "integer", - -- default = 0, - -- markdownDescription = "%config.intelliSense.searchDepth%" - --}, - ['Lua.window.statusBar'] = { - scope = 'resource', - type = 'boolean', - default = true, - markdownDescription = '%config.window.statusBar%', - }, - ['Lua.window.progressBar'] = { - scope = 'resource', - type = 'boolean', - default = true, - markdownDescription = '%config.window.progressBar%', - }, - ['Lua.telemetry.enable'] = { - scope = 'resource', - type = {"boolean", "null"}, - default = json.null, - markdownDescription = "%config.telemetry.enable%", - tags = {"telemetry"}, - }, - ['Lua.hint.enable'] = { - scope = 'resource', - type = 'boolean', - default = false, - markdownDescription = '%config.hint.enable%', - }, - ['Lua.hint.paramType'] = { - scope = 'resource', - type = 'boolean', - default = true, - markdownDescription = '%config.hint.paramType%', - }, - ['Lua.hint.setType'] = { - scope = 'resource', - type = 'boolean', - default = false, - markdownDescription = '%config.hint.setType%', - }, - ['Lua.hint.paramName'] = { - scope = 'resource', - type = 'string', - default = 'All', - enum = { - "All", - "Literal", - "Disable", - }, - markdownEnumDescriptions = { - "%config.hint.paramName.All%", - "%config.hint.paramName.Literal%", - "%config.hint.paramName.Disable%", - }, - markdownDescription = '%config.hint.paramName%', - }, - ["Lua.hint.arrayIndex"] = { - scope = 'resource', - type = "string", - default = "Auto", - enum = { - "Enable", - "Auto", - "Disable", - }, - markdownEnumDescriptions = { - "%config.hint.arrayIndex.Enable%", - "%config.hint.arrayIndex.Auto%", - "%config.hint.arrayIndex.Disable%", - }, - markdownDescription = "%config.hint.arrayIndex%" - }, - ["Lua.format.enable"] = { - scope = 'resource', - type = "boolean", - default = true, - markdownDescription = "%config.format.enable%" - }, - ["Lua.format.defaultConfig"] = { - scope = 'resource', - type = 'object', - markdownDescription = "%config.format.defaultConfig%", - }, - ['Lua.misc.parameters'] = { - scope = 'resource', - type = "array", - items = { - type = 'string', - }, - markdownDescription = '%config.misc.parameters%', - }, - ['Lua.IntelliSense.traceLocalSet'] = { - scope = 'resource', - type = "boolean", - default = false, - markdownDescription = '%config.IntelliSense.traceLocalSet%', - }, - ['Lua.IntelliSense.traceReturn'] = { - scope = 'resource', - type = "boolean", - default = false, - markdownDescription = '%config.IntelliSense.traceReturn%', - }, - ['Lua.IntelliSense.traceBeSetted'] = { - scope = 'resource', - type = "boolean", - default = false, - markdownDescription = '%config.IntelliSense.traceBeSetted%', - }, - ['Lua.IntelliSense.traceFieldInject'] = { - scope = 'resource', - type = "boolean", - default = false, - markdownDescription = '%config.IntelliSense.traceFieldInject%', - }, -} - -local DiagSeverity = config["Lua.diagnostics.severity"].properties -for name, level in pairs(const.DiagnosticDefaultSeverity) do - DiagSeverity[name] = { - type = 'string', - default = level, - description = '%config.diagnostics.' .. name .. '%', - enum = { - 'Error', - 'Warning', - 'Information', - 'Hint', - } - } -end - -local DiagNeededFileStatus = config["Lua.diagnostics.neededFileStatus"].properties -for name, level in pairs(const.DiagnosticDefaultNeededFileStatus) do - DiagNeededFileStatus[name] = { - type = 'string', - default = level, - description = '%config.diagnostics.' .. name .. '%', - enum = { - 'Any', - 'Opened', - 'None', - } - } -end - -local builtin = config["Lua.runtime.builtin"].properties -for name, status in pairs(const.BuiltIn) do - builtin[name] = { - type = 'string', - default = status, - description = '%config.runtime.builtin.' .. name .. '%', - enum = { - 'default', - 'enable', - 'disable', - } - } -end - -return config diff --git a/setting/schema-pt-br.json b/setting/schema-pt-br.json index 8263d8e9e4d3c11ad5e843b7690101e950129530..a9a3bacb4f9106e113a65c0c8a46b97d0cd68334 100644 --- a/setting/schema-pt-br.json +++ b/setting/schema-pt-br.json @@ -1,46 +1,6 @@ { "description": "Setting of sumneko.lua", "properties": { - "IntelliSense": { - "properties": { - "traceBeSetted": { - "$ref": "#/properties/IntelliSense.traceBeSetted" - }, - "traceFieldInject": { - "$ref": "#/properties/IntelliSense.traceFieldInject" - }, - "traceLocalSet": { - "$ref": "#/properties/IntelliSense.traceLocalSet" - }, - "traceReturn": { - "$ref": "#/properties/IntelliSense.traceReturn" - } - } - }, - "IntelliSense.traceBeSetted": { - "default": false, - "markdownDescription": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceFieldInject": { - "default": false, - "markdownDescription": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceLocalSet": { - "default": false, - "markdownDescription": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceReturn": { - "default": false, - "markdownDescription": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "scope": "resource", - "type": "boolean" - }, "completion": { "properties": { "autoRequire": { @@ -200,6 +160,7 @@ } }, "diagnostics.disable": { + "default": [], "items": { "type": "string" }, @@ -225,6 +186,7 @@ "type": "boolean" }, "diagnostics.globals": { + "default": [], "items": { "type": "string" }, @@ -1229,8 +1191,10 @@ } }, "format.defaultConfig": { + "default": [], "markdownDescription": "%config.format.defaultConfig%", "scope": "resource", + "title": "defaultConfig", "type": "object" }, "format.enable": { @@ -1244,6 +1208,9 @@ "arrayIndex": { "$ref": "#/properties/hint.arrayIndex" }, + "await": { + "$ref": "#/properties/hint.await" + }, "enable": { "$ref": "#/properties/hint.enable" }, @@ -1274,6 +1241,12 @@ "scope": "resource", "type": "string" }, + "hint.await": { + "default": true, + "markdownDescription": "%config.hint.await%", + "scope": "resource", + "type": "boolean" + }, "hint.enable": { "default": false, "markdownDescription": "Enable inlay hint.", @@ -1316,6 +1289,9 @@ "enumsLimit": { "$ref": "#/properties/hover.enumsLimit" }, + "expandAlias": { + "$ref": "#/properties/hover.expandAlias" + }, "previewFields": { "$ref": "#/properties/hover.previewFields" }, @@ -1342,6 +1318,12 @@ "scope": "resource", "type": "integer" }, + "hover.expandAlias": { + "default": true, + "markdownDescription": "%config.hover.expandAlias%", + "scope": "resource", + "type": "boolean" + }, "hover.previewFields": { "default": 20, "markdownDescription": "When hovering to view a table, limits the maximum number of previews for fields.", @@ -1374,6 +1356,7 @@ } }, "misc.parameters": { + "default": [], "items": { "type": "string" }, @@ -1389,6 +1372,9 @@ "fileEncoding": { "$ref": "#/properties/runtime.fileEncoding" }, + "meta": { + "$ref": "#/properties/runtime.meta" + }, "nonstandardSymbol": { "$ref": "#/properties/runtime.nonstandardSymbol" }, @@ -1568,6 +1554,7 @@ } }, "scope": "resource", + "title": "builtin", "type": "object" }, "runtime.fileEncoding": { @@ -1579,10 +1566,23 @@ "utf16be" ], "markdownDescription": "File encoding. The `ansi` option is only available under the `Windows` platform.", + "markdownEnumDescriptions": [ + "%config.runtime.fileEncoding.utf8%", + "%config.runtime.fileEncoding.ansi%", + "%config.runtime.fileEncoding.utf16le%", + "%config.runtime.fileEncoding.utf16be%" + ], + "scope": "resource", + "type": "string" + }, + "runtime.meta": { + "default": "${version} ${language} ${encoding}", + "markdownDescription": "%config.runtime.meta%", "scope": "resource", "type": "string" }, "runtime.nonstandardSymbol": { + "default": [], "items": { "enum": [ "//", @@ -1630,6 +1630,7 @@ }, "runtime.special": { "additionalProperties": false, + "default": [], "markdownDescription": "The custom global variables are regarded as some special built-in variables, and the language server will provide special support\nThe following example shows that 'include' is treated as' require '.\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n", "patternProperties": { ".*": { @@ -1650,6 +1651,7 @@ } }, "scope": "resource", + "title": "special", "type": "object" }, "runtime.unicodeName": { @@ -1668,6 +1670,13 @@ "LuaJIT" ], "markdownDescription": "Lua runtime version.", + "markdownEnumDescriptions": [ + "%config.runtime.version.Lua 5.1%", + "%config.runtime.version.Lua 5.2%", + "%config.runtime.version.Lua 5.3%", + "%config.runtime.version.Lua 5.4%", + "%config.runtime.version.LuaJIT%" + ], "scope": "resource", "type": "string" }, @@ -1724,6 +1733,22 @@ "scope": "resource", "type": "boolean" }, + "spell": { + "properties": { + "dict": { + "$ref": "#/properties/spell.dict" + } + } + }, + "spell.dict": { + "default": [], + "items": { + "type": "string" + }, + "markdownDescription": "%config.spell.dict%", + "scope": "resource", + "type": "array" + }, "telemetry": { "properties": { "enable": { @@ -1820,6 +1845,7 @@ "type": "boolean" }, "workspace.library": { + "default": [], "items": { "type": "string" }, @@ -1859,6 +1885,7 @@ "type": "boolean" }, "workspace.userThirdParty": { + "default": [], "items": { "type": "string" }, diff --git a/setting/schema-zh-cn.json b/setting/schema-zh-cn.json index 8dd363fbf7baa7c66d84f07a7a4b5e203a36263f..465b497663068eb9d08e449e022604230b7f3e0a 100644 --- a/setting/schema-zh-cn.json +++ b/setting/schema-zh-cn.json @@ -1,46 +1,6 @@ { "description": "Setting of sumneko.lua", "properties": { - "IntelliSense": { - "properties": { - "traceBeSetted": { - "$ref": "#/properties/IntelliSense.traceBeSetted" - }, - "traceFieldInject": { - "$ref": "#/properties/IntelliSense.traceFieldInject" - }, - "traceLocalSet": { - "$ref": "#/properties/IntelliSense.traceLocalSet" - }, - "traceReturn": { - "$ref": "#/properties/IntelliSense.traceReturn" - } - } - }, - "IntelliSense.traceBeSetted": { - "default": false, - "markdownDescription": "请查阅[文档](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceFieldInject": { - "default": false, - "markdownDescription": "请查阅[文档](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceLocalSet": { - "default": false, - "markdownDescription": "请查阅[文档](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceReturn": { - "default": false, - "markdownDescription": "请查阅[文档](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", - "scope": "resource", - "type": "boolean" - }, "completion": { "properties": { "autoRequire": { @@ -200,6 +160,7 @@ } }, "diagnostics.disable": { + "default": [], "items": { "type": "string" }, @@ -225,6 +186,7 @@ "type": "boolean" }, "diagnostics.globals": { + "default": [], "items": { "type": "string" }, @@ -1229,8 +1191,10 @@ } }, "format.defaultConfig": { + "default": [], "markdownDescription": "%config.format.defaultConfig%", "scope": "resource", + "title": "defaultConfig", "type": "object" }, "format.enable": { @@ -1244,6 +1208,9 @@ "arrayIndex": { "$ref": "#/properties/hint.arrayIndex" }, + "await": { + "$ref": "#/properties/hint.await" + }, "enable": { "$ref": "#/properties/hint.enable" }, @@ -1274,6 +1241,12 @@ "scope": "resource", "type": "string" }, + "hint.await": { + "default": true, + "markdownDescription": "%config.hint.await%", + "scope": "resource", + "type": "boolean" + }, "hint.enable": { "default": false, "markdownDescription": "启用内联提示。", @@ -1316,6 +1289,9 @@ "enumsLimit": { "$ref": "#/properties/hover.enumsLimit" }, + "expandAlias": { + "$ref": "#/properties/hover.expandAlias" + }, "previewFields": { "$ref": "#/properties/hover.previewFields" }, @@ -1342,6 +1318,12 @@ "scope": "resource", "type": "integer" }, + "hover.expandAlias": { + "default": true, + "markdownDescription": "%config.hover.expandAlias%", + "scope": "resource", + "type": "boolean" + }, "hover.previewFields": { "default": 20, "markdownDescription": "悬停提示查看表时,限制表内字段的最大预览数量。", @@ -1374,6 +1356,7 @@ } }, "misc.parameters": { + "default": [], "items": { "type": "string" }, @@ -1389,6 +1372,9 @@ "fileEncoding": { "$ref": "#/properties/runtime.fileEncoding" }, + "meta": { + "$ref": "#/properties/runtime.meta" + }, "nonstandardSymbol": { "$ref": "#/properties/runtime.nonstandardSymbol" }, @@ -1568,6 +1554,7 @@ } }, "scope": "resource", + "title": "builtin", "type": "object" }, "runtime.fileEncoding": { @@ -1579,10 +1566,23 @@ "utf16be" ], "markdownDescription": "文件编码,`ansi` 选项只在 `Windows` 平台下有效。", + "markdownEnumDescriptions": [ + "%config.runtime.fileEncoding.utf8%", + "%config.runtime.fileEncoding.ansi%", + "%config.runtime.fileEncoding.utf16le%", + "%config.runtime.fileEncoding.utf16be%" + ], + "scope": "resource", + "type": "string" + }, + "runtime.meta": { + "default": "${version} ${language} ${encoding}", + "markdownDescription": "%config.runtime.meta%", "scope": "resource", "type": "string" }, "runtime.nonstandardSymbol": { + "default": [], "items": { "enum": [ "//", @@ -1630,6 +1630,7 @@ }, "runtime.special": { "additionalProperties": false, + "default": [], "markdownDescription": "将自定义全局变量视为一些特殊的内置变量,语言服务将提供特殊的支持。\n下面这个例子表示将 `include` 视为 `require` 。\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n", "patternProperties": { ".*": { @@ -1650,6 +1651,7 @@ } }, "scope": "resource", + "title": "special", "type": "object" }, "runtime.unicodeName": { @@ -1668,6 +1670,13 @@ "LuaJIT" ], "markdownDescription": "Lua运行版本。", + "markdownEnumDescriptions": [ + "%config.runtime.version.Lua 5.1%", + "%config.runtime.version.Lua 5.2%", + "%config.runtime.version.Lua 5.3%", + "%config.runtime.version.Lua 5.4%", + "%config.runtime.version.LuaJIT%" + ], "scope": "resource", "type": "string" }, @@ -1724,6 +1733,22 @@ "scope": "resource", "type": "boolean" }, + "spell": { + "properties": { + "dict": { + "$ref": "#/properties/spell.dict" + } + } + }, + "spell.dict": { + "default": [], + "items": { + "type": "string" + }, + "markdownDescription": "%config.spell.dict%", + "scope": "resource", + "type": "array" + }, "telemetry": { "properties": { "enable": { @@ -1820,6 +1845,7 @@ "type": "boolean" }, "workspace.library": { + "default": [], "items": { "type": "string" }, @@ -1859,6 +1885,7 @@ "type": "boolean" }, "workspace.userThirdParty": { + "default": [], "items": { "type": "string" }, diff --git a/setting/schema-zh-tw.json b/setting/schema-zh-tw.json index 2460292f0d30a1f53429fc28ffa10b62a3aca555..4495d5eeaa200b308867f2d0b7dc419fbb3efa6f 100644 --- a/setting/schema-zh-tw.json +++ b/setting/schema-zh-tw.json @@ -1,46 +1,6 @@ { "description": "Setting of sumneko.lua", "properties": { - "IntelliSense": { - "properties": { - "traceBeSetted": { - "$ref": "#/properties/IntelliSense.traceBeSetted" - }, - "traceFieldInject": { - "$ref": "#/properties/IntelliSense.traceFieldInject" - }, - "traceLocalSet": { - "$ref": "#/properties/IntelliSense.traceLocalSet" - }, - "traceReturn": { - "$ref": "#/properties/IntelliSense.traceReturn" - } - } - }, - "IntelliSense.traceBeSetted": { - "default": false, - "markdownDescription": "請查閲[文件](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceFieldInject": { - "default": false, - "markdownDescription": "請查閲[文件](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceLocalSet": { - "default": false, - "markdownDescription": "請查閲[文件](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceReturn": { - "default": false, - "markdownDescription": "請查閲[文件](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", - "scope": "resource", - "type": "boolean" - }, "completion": { "properties": { "autoRequire": { @@ -200,6 +160,7 @@ } }, "diagnostics.disable": { + "default": [], "items": { "type": "string" }, @@ -225,6 +186,7 @@ "type": "boolean" }, "diagnostics.globals": { + "default": [], "items": { "type": "string" }, @@ -1229,8 +1191,10 @@ } }, "format.defaultConfig": { + "default": [], "markdownDescription": "%config.format.defaultConfig%", "scope": "resource", + "title": "defaultConfig", "type": "object" }, "format.enable": { @@ -1244,6 +1208,9 @@ "arrayIndex": { "$ref": "#/properties/hint.arrayIndex" }, + "await": { + "$ref": "#/properties/hint.await" + }, "enable": { "$ref": "#/properties/hint.enable" }, @@ -1274,6 +1241,12 @@ "scope": "resource", "type": "string" }, + "hint.await": { + "default": true, + "markdownDescription": "%config.hint.await%", + "scope": "resource", + "type": "boolean" + }, "hint.enable": { "default": false, "markdownDescription": "啟用內嵌提示。", @@ -1316,6 +1289,9 @@ "enumsLimit": { "$ref": "#/properties/hover.enumsLimit" }, + "expandAlias": { + "$ref": "#/properties/hover.expandAlias" + }, "previewFields": { "$ref": "#/properties/hover.previewFields" }, @@ -1342,6 +1318,12 @@ "scope": "resource", "type": "integer" }, + "hover.expandAlias": { + "default": true, + "markdownDescription": "%config.hover.expandAlias%", + "scope": "resource", + "type": "boolean" + }, "hover.previewFields": { "default": 20, "markdownDescription": "懸浮提示檢視表時,限制表內欄位的最大預覽數量。", @@ -1374,6 +1356,7 @@ } }, "misc.parameters": { + "default": [], "items": { "type": "string" }, @@ -1389,6 +1372,9 @@ "fileEncoding": { "$ref": "#/properties/runtime.fileEncoding" }, + "meta": { + "$ref": "#/properties/runtime.meta" + }, "nonstandardSymbol": { "$ref": "#/properties/runtime.nonstandardSymbol" }, @@ -1568,6 +1554,7 @@ } }, "scope": "resource", + "title": "builtin", "type": "object" }, "runtime.fileEncoding": { @@ -1579,10 +1566,23 @@ "utf16be" ], "markdownDescription": "檔案編碼,`ansi` 選項只在 `Windows` 平台下有效。", + "markdownEnumDescriptions": [ + "%config.runtime.fileEncoding.utf8%", + "%config.runtime.fileEncoding.ansi%", + "%config.runtime.fileEncoding.utf16le%", + "%config.runtime.fileEncoding.utf16be%" + ], + "scope": "resource", + "type": "string" + }, + "runtime.meta": { + "default": "${version} ${language} ${encoding}", + "markdownDescription": "%config.runtime.meta%", "scope": "resource", "type": "string" }, "runtime.nonstandardSymbol": { + "default": [], "items": { "enum": [ "//", @@ -1630,6 +1630,7 @@ }, "runtime.special": { "additionalProperties": false, + "default": [], "markdownDescription": "將自訂全域變數視為一些特殊的內建變數,語言服務將提供特殊的支援。\n下面這個例子表示將 `include` 視為 `require` 。\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n", "patternProperties": { ".*": { @@ -1650,6 +1651,7 @@ } }, "scope": "resource", + "title": "special", "type": "object" }, "runtime.unicodeName": { @@ -1668,6 +1670,13 @@ "LuaJIT" ], "markdownDescription": "Lua執行版本。", + "markdownEnumDescriptions": [ + "%config.runtime.version.Lua 5.1%", + "%config.runtime.version.Lua 5.2%", + "%config.runtime.version.Lua 5.3%", + "%config.runtime.version.Lua 5.4%", + "%config.runtime.version.LuaJIT%" + ], "scope": "resource", "type": "string" }, @@ -1724,6 +1733,22 @@ "scope": "resource", "type": "boolean" }, + "spell": { + "properties": { + "dict": { + "$ref": "#/properties/spell.dict" + } + } + }, + "spell.dict": { + "default": [], + "items": { + "type": "string" + }, + "markdownDescription": "%config.spell.dict%", + "scope": "resource", + "type": "array" + }, "telemetry": { "properties": { "enable": { @@ -1820,6 +1845,7 @@ "type": "boolean" }, "workspace.library": { + "default": [], "items": { "type": "string" }, @@ -1859,6 +1885,7 @@ "type": "boolean" }, "workspace.userThirdParty": { + "default": [], "items": { "type": "string" }, diff --git a/setting/schema.json b/setting/schema.json index c131e3fac0c2f01be487615d807712273b3ebf62..f9d8426261164c0902d423db12beb3c79e3fb8d7 100644 --- a/setting/schema.json +++ b/setting/schema.json @@ -1,46 +1,6 @@ { "description": "Setting of sumneko.lua", "properties": { - "IntelliSense": { - "properties": { - "traceBeSetted": { - "$ref": "#/properties/IntelliSense.traceBeSetted" - }, - "traceFieldInject": { - "$ref": "#/properties/IntelliSense.traceFieldInject" - }, - "traceLocalSet": { - "$ref": "#/properties/IntelliSense.traceLocalSet" - }, - "traceReturn": { - "$ref": "#/properties/IntelliSense.traceReturn" - } - } - }, - "IntelliSense.traceBeSetted": { - "default": false, - "markdownDescription": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceFieldInject": { - "default": false, - "markdownDescription": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceLocalSet": { - "default": false, - "markdownDescription": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "scope": "resource", - "type": "boolean" - }, - "IntelliSense.traceReturn": { - "default": false, - "markdownDescription": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "scope": "resource", - "type": "boolean" - }, "completion": { "properties": { "autoRequire": { @@ -200,6 +160,7 @@ } }, "diagnostics.disable": { + "default": [], "items": { "type": "string" }, @@ -225,6 +186,7 @@ "type": "boolean" }, "diagnostics.globals": { + "default": [], "items": { "type": "string" }, @@ -1229,8 +1191,10 @@ } }, "format.defaultConfig": { + "default": [], "markdownDescription": "%config.format.defaultConfig%", "scope": "resource", + "title": "defaultConfig", "type": "object" }, "format.enable": { @@ -1244,6 +1208,9 @@ "arrayIndex": { "$ref": "#/properties/hint.arrayIndex" }, + "await": { + "$ref": "#/properties/hint.await" + }, "enable": { "$ref": "#/properties/hint.enable" }, @@ -1274,6 +1241,12 @@ "scope": "resource", "type": "string" }, + "hint.await": { + "default": true, + "markdownDescription": "%config.hint.await%", + "scope": "resource", + "type": "boolean" + }, "hint.enable": { "default": false, "markdownDescription": "Enable inlay hint.", @@ -1316,6 +1289,9 @@ "enumsLimit": { "$ref": "#/properties/hover.enumsLimit" }, + "expandAlias": { + "$ref": "#/properties/hover.expandAlias" + }, "previewFields": { "$ref": "#/properties/hover.previewFields" }, @@ -1342,6 +1318,12 @@ "scope": "resource", "type": "integer" }, + "hover.expandAlias": { + "default": true, + "markdownDescription": "%config.hover.expandAlias%", + "scope": "resource", + "type": "boolean" + }, "hover.previewFields": { "default": 20, "markdownDescription": "When hovering to view a table, limits the maximum number of previews for fields.", @@ -1374,6 +1356,7 @@ } }, "misc.parameters": { + "default": [], "items": { "type": "string" }, @@ -1389,6 +1372,9 @@ "fileEncoding": { "$ref": "#/properties/runtime.fileEncoding" }, + "meta": { + "$ref": "#/properties/runtime.meta" + }, "nonstandardSymbol": { "$ref": "#/properties/runtime.nonstandardSymbol" }, @@ -1568,6 +1554,7 @@ } }, "scope": "resource", + "title": "builtin", "type": "object" }, "runtime.fileEncoding": { @@ -1579,10 +1566,23 @@ "utf16be" ], "markdownDescription": "File encoding. The `ansi` option is only available under the `Windows` platform.", + "markdownEnumDescriptions": [ + "%config.runtime.fileEncoding.utf8%", + "%config.runtime.fileEncoding.ansi%", + "%config.runtime.fileEncoding.utf16le%", + "%config.runtime.fileEncoding.utf16be%" + ], + "scope": "resource", + "type": "string" + }, + "runtime.meta": { + "default": "${version} ${language} ${encoding}", + "markdownDescription": "%config.runtime.meta%", "scope": "resource", "type": "string" }, "runtime.nonstandardSymbol": { + "default": [], "items": { "enum": [ "//", @@ -1630,6 +1630,7 @@ }, "runtime.special": { "additionalProperties": false, + "default": [], "markdownDescription": "The custom global variables are regarded as some special built-in variables, and the language server will provide special support\nThe following example shows that 'include' is treated as' require '.\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n", "patternProperties": { ".*": { @@ -1650,6 +1651,7 @@ } }, "scope": "resource", + "title": "special", "type": "object" }, "runtime.unicodeName": { @@ -1668,6 +1670,13 @@ "LuaJIT" ], "markdownDescription": "Lua runtime version.", + "markdownEnumDescriptions": [ + "%config.runtime.version.Lua 5.1%", + "%config.runtime.version.Lua 5.2%", + "%config.runtime.version.Lua 5.3%", + "%config.runtime.version.Lua 5.4%", + "%config.runtime.version.LuaJIT%" + ], "scope": "resource", "type": "string" }, @@ -1724,6 +1733,22 @@ "scope": "resource", "type": "boolean" }, + "spell": { + "properties": { + "dict": { + "$ref": "#/properties/spell.dict" + } + } + }, + "spell.dict": { + "default": [], + "items": { + "type": "string" + }, + "markdownDescription": "%config.spell.dict%", + "scope": "resource", + "type": "array" + }, "telemetry": { "properties": { "enable": { @@ -1820,6 +1845,7 @@ "type": "boolean" }, "workspace.library": { + "default": [], "items": { "type": "string" }, @@ -1859,6 +1885,7 @@ "type": "boolean" }, "workspace.userThirdParty": { + "default": [], "items": { "type": "string" },