diff --git a/setting/build.lua b/setting/build.lua index 61f5871d8fe26ad2d445928d6e40402ee80c2560..3f15a11af435771ea11f5892b52aff0efa2251bf 100644 --- a/setting/build.lua +++ b/setting/build.lua @@ -6,15 +6,15 @@ local fsu = require 'fs-utility' local function addSplited(t, key, value) t[key] = value - local left, right = key:match '([^%.]+)%.(.+)' - if not left then - return + for pos in key:gmatch '()%.' do + local left = key:sub(1, pos - 1) + local right = key:sub(pos + 1) + local nt = t[left] or { + properties = {} + } + t[left] = nt + addSplited(nt.properties, right, value) end - local nt = t[left] or { - properties = {} - } - t[left] = nt - addSplited(nt.properties, right, value) end local function copyWithNLS(t, callback) diff --git a/setting/schema-zh-cn.json b/setting/schema-zh-cn.json index 60936a7febfa60d606bde6c8b9fe95d8ecfe9bac..12e1ab27212ce3569f1556eaeea52d3fb82180c1 100644 --- a/setting/schema-zh-cn.json +++ b/setting/schema-zh-cn.json @@ -350,6 +350,13 @@ } } }, + "Lua.color": { + "properties": { + "mode": { + "$ref": "#/properties/Lua.color.mode" + } + } + }, "Lua.color.mode": { "default": "Semantic", "enum": [ @@ -366,6 +373,37 @@ "scope": "resource", "type": "string" }, + "Lua.completion": { + "properties": { + "autoRequire": { + "$ref": "#/properties/Lua.completion.autoRequire" + }, + "callSnippet": { + "$ref": "#/properties/Lua.completion.callSnippet" + }, + "displayContext": { + "$ref": "#/properties/Lua.completion.displayContext" + }, + "enable": { + "$ref": "#/properties/Lua.completion.enable" + }, + "keywordSnippet": { + "$ref": "#/properties/Lua.completion.keywordSnippet" + }, + "requireSeparator": { + "$ref": "#/properties/Lua.completion.requireSeparator" + }, + "showParams": { + "$ref": "#/properties/Lua.completion.showParams" + }, + "showWord": { + "$ref": "#/properties/Lua.completion.showWord" + }, + "workspaceWord": { + "$ref": "#/properties/Lua.completion.workspaceWord" + } + } + }, "Lua.completion.autoRequire": { "default": true, "markdownDescription": "输入内容看起来是个文件名时,自动 `require` 此文件。", @@ -450,6 +488,37 @@ "scope": "resource", "type": "boolean" }, + "Lua.diagnostics": { + "properties": { + "disable": { + "$ref": "#/properties/Lua.diagnostics.disable" + }, + "enable": { + "$ref": "#/properties/Lua.diagnostics.enable" + }, + "globals": { + "$ref": "#/properties/Lua.diagnostics.globals" + }, + "ignoredFiles": { + "$ref": "#/properties/Lua.diagnostics.ignoredFiles" + }, + "libraryFiles": { + "$ref": "#/properties/Lua.diagnostics.libraryFiles" + }, + "neededFileStatus": { + "$ref": "#/properties/Lua.diagnostics.neededFileStatus" + }, + "severity": { + "$ref": "#/properties/Lua.diagnostics.severity" + }, + "workspaceDelay": { + "$ref": "#/properties/Lua.diagnostics.workspaceDelay" + }, + "workspaceRate": { + "$ref": "#/properties/Lua.diagnostics.workspaceRate" + } + } + }, "Lua.diagnostics.disable": { "items": { "type": "string" @@ -1360,6 +1429,22 @@ "scope": "resource", "type": "integer" }, + "Lua.hint": { + "properties": { + "enable": { + "$ref": "#/properties/Lua.hint.enable" + }, + "paramName": { + "$ref": "#/properties/Lua.hint.paramName" + }, + "paramType": { + "$ref": "#/properties/Lua.hint.paramType" + }, + "setType": { + "$ref": "#/properties/Lua.hint.setType" + } + } + }, "Lua.hint.enable": { "default": false, "markdownDescription": "启用内联提示。", @@ -1394,6 +1479,28 @@ "scope": "resource", "type": "boolean" }, + "Lua.hover": { + "properties": { + "enable": { + "$ref": "#/properties/Lua.hover.enable" + }, + "enumsLimit": { + "$ref": "#/properties/Lua.hover.enumsLimit" + }, + "previewFields": { + "$ref": "#/properties/Lua.hover.previewFields" + }, + "viewNumber": { + "$ref": "#/properties/Lua.hover.viewNumber" + }, + "viewString": { + "$ref": "#/properties/Lua.hover.viewString" + }, + "viewStringMax": { + "$ref": "#/properties/Lua.hover.viewStringMax" + } + } + }, "Lua.hover.enable": { "default": true, "markdownDescription": "启用悬停提示。", @@ -1430,6 +1537,13 @@ "scope": "resource", "type": "integer" }, + "Lua.misc": { + "properties": { + "parameters": { + "$ref": "#/properties/Lua.misc.parameters" + } + } + }, "Lua.misc.parameters": { "items": { "type": "string" @@ -1438,6 +1552,34 @@ "scope": "resource", "type": "array" }, + "Lua.runtime": { + "properties": { + "builtin": { + "$ref": "#/properties/Lua.runtime.builtin" + }, + "fileEncoding": { + "$ref": "#/properties/Lua.runtime.fileEncoding" + }, + "nonstandardSymbol": { + "$ref": "#/properties/Lua.runtime.nonstandardSymbol" + }, + "path": { + "$ref": "#/properties/Lua.runtime.path" + }, + "plugin": { + "$ref": "#/properties/Lua.runtime.plugin" + }, + "special": { + "$ref": "#/properties/Lua.runtime.special" + }, + "unicodeName": { + "$ref": "#/properties/Lua.runtime.unicodeName" + }, + "version": { + "$ref": "#/properties/Lua.runtime.version" + } + } + }, "Lua.runtime.builtin": { "markdownDescription": "调整内置库的启用状态,你可以根据实际运行环境禁用掉不存在的库(或重新定义)。\n\n* `default`: 表示库会根据运行版本启用或禁用\n* `enable`: 总是启用\n* `disable`: 总是禁用\n", "properties": { @@ -1702,12 +1844,26 @@ "scope": "resource", "type": "string" }, + "Lua.signatureHelp": { + "properties": { + "enable": { + "$ref": "#/properties/Lua.signatureHelp.enable" + } + } + }, "Lua.signatureHelp.enable": { "default": true, "markdownDescription": "启用参数提示。", "scope": "resource", "type": "boolean" }, + "Lua.telemetry": { + "properties": { + "enable": { + "$ref": "#/properties/Lua.telemetry.enable" + } + } + }, "Lua.telemetry.enable": { "default": null, "markdownDescription": "启用遥测,通过网络发送你的编辑器信息与错误日志。在[此处](https://github.com/sumneko/lua-language-server/wiki/%E9%9A%90%E7%A7%81%E5%A3%B0%E6%98%8E)阅读我们的隐私声明。\n", @@ -1717,6 +1873,16 @@ "null" ] }, + "Lua.window": { + "properties": { + "progressBar": { + "$ref": "#/properties/Lua.window.progressBar" + }, + "statusBar": { + "$ref": "#/properties/Lua.window.statusBar" + } + } + }, "Lua.window.progressBar": { "default": true, "markdownDescription": "在状态栏显示进度条。", @@ -1729,6 +1895,34 @@ "scope": "resource", "type": "boolean" }, + "Lua.workspace": { + "properties": { + "checkThirdParty": { + "$ref": "#/properties/Lua.workspace.checkThirdParty" + }, + "ignoreDir": { + "$ref": "#/properties/Lua.workspace.ignoreDir" + }, + "ignoreSubmodules": { + "$ref": "#/properties/Lua.workspace.ignoreSubmodules" + }, + "library": { + "$ref": "#/properties/Lua.workspace.library" + }, + "maxPreload": { + "$ref": "#/properties/Lua.workspace.maxPreload" + }, + "preloadFileSize": { + "$ref": "#/properties/Lua.workspace.preloadFileSize" + }, + "useGitIgnore": { + "$ref": "#/properties/Lua.workspace.useGitIgnore" + }, + "userThirdParty": { + "$ref": "#/properties/Lua.workspace.userThirdParty" + } + } + }, "Lua.workspace.checkThirdParty": { "default": true, "markdownDescription": "自动检测与适配第三方库,目前支持的库为:\n\n* OpenResty\n* Cocos4.0\n* LÖVE\n* Jass\n", diff --git a/setting/schema.json b/setting/schema.json index ab3d0fe30bbdb36c2526c0d3b08e439f7c9a4ab5..d12632e95a967d9d6d92ce526df04e801ec4dccb 100644 --- a/setting/schema.json +++ b/setting/schema.json @@ -350,6 +350,13 @@ } } }, + "Lua.color": { + "properties": { + "mode": { + "$ref": "#/properties/Lua.color.mode" + } + } + }, "Lua.color.mode": { "default": "Semantic", "enum": [ @@ -366,6 +373,37 @@ "scope": "resource", "type": "string" }, + "Lua.completion": { + "properties": { + "autoRequire": { + "$ref": "#/properties/Lua.completion.autoRequire" + }, + "callSnippet": { + "$ref": "#/properties/Lua.completion.callSnippet" + }, + "displayContext": { + "$ref": "#/properties/Lua.completion.displayContext" + }, + "enable": { + "$ref": "#/properties/Lua.completion.enable" + }, + "keywordSnippet": { + "$ref": "#/properties/Lua.completion.keywordSnippet" + }, + "requireSeparator": { + "$ref": "#/properties/Lua.completion.requireSeparator" + }, + "showParams": { + "$ref": "#/properties/Lua.completion.showParams" + }, + "showWord": { + "$ref": "#/properties/Lua.completion.showWord" + }, + "workspaceWord": { + "$ref": "#/properties/Lua.completion.workspaceWord" + } + } + }, "Lua.completion.autoRequire": { "default": true, "markdownDescription": "When the input looks like a file name, automatically `require` this file.", @@ -450,6 +488,37 @@ "scope": "resource", "type": "boolean" }, + "Lua.diagnostics": { + "properties": { + "disable": { + "$ref": "#/properties/Lua.diagnostics.disable" + }, + "enable": { + "$ref": "#/properties/Lua.diagnostics.enable" + }, + "globals": { + "$ref": "#/properties/Lua.diagnostics.globals" + }, + "ignoredFiles": { + "$ref": "#/properties/Lua.diagnostics.ignoredFiles" + }, + "libraryFiles": { + "$ref": "#/properties/Lua.diagnostics.libraryFiles" + }, + "neededFileStatus": { + "$ref": "#/properties/Lua.diagnostics.neededFileStatus" + }, + "severity": { + "$ref": "#/properties/Lua.diagnostics.severity" + }, + "workspaceDelay": { + "$ref": "#/properties/Lua.diagnostics.workspaceDelay" + }, + "workspaceRate": { + "$ref": "#/properties/Lua.diagnostics.workspaceRate" + } + } + }, "Lua.diagnostics.disable": { "items": { "type": "string" @@ -1360,6 +1429,22 @@ "scope": "resource", "type": "integer" }, + "Lua.hint": { + "properties": { + "enable": { + "$ref": "#/properties/Lua.hint.enable" + }, + "paramName": { + "$ref": "#/properties/Lua.hint.paramName" + }, + "paramType": { + "$ref": "#/properties/Lua.hint.paramType" + }, + "setType": { + "$ref": "#/properties/Lua.hint.setType" + } + } + }, "Lua.hint.enable": { "default": false, "markdownDescription": "Enabel hint.", @@ -1394,6 +1479,28 @@ "scope": "resource", "type": "boolean" }, + "Lua.hover": { + "properties": { + "enable": { + "$ref": "#/properties/Lua.hover.enable" + }, + "enumsLimit": { + "$ref": "#/properties/Lua.hover.enumsLimit" + }, + "previewFields": { + "$ref": "#/properties/Lua.hover.previewFields" + }, + "viewNumber": { + "$ref": "#/properties/Lua.hover.viewNumber" + }, + "viewString": { + "$ref": "#/properties/Lua.hover.viewString" + }, + "viewStringMax": { + "$ref": "#/properties/Lua.hover.viewStringMax" + } + } + }, "Lua.hover.enable": { "default": true, "markdownDescription": "Enable hover.", @@ -1430,6 +1537,13 @@ "scope": "resource", "type": "integer" }, + "Lua.misc": { + "properties": { + "parameters": { + "$ref": "#/properties/Lua.misc.parameters" + } + } + }, "Lua.misc.parameters": { "items": { "type": "string" @@ -1438,6 +1552,34 @@ "scope": "resource", "type": "array" }, + "Lua.runtime": { + "properties": { + "builtin": { + "$ref": "#/properties/Lua.runtime.builtin" + }, + "fileEncoding": { + "$ref": "#/properties/Lua.runtime.fileEncoding" + }, + "nonstandardSymbol": { + "$ref": "#/properties/Lua.runtime.nonstandardSymbol" + }, + "path": { + "$ref": "#/properties/Lua.runtime.path" + }, + "plugin": { + "$ref": "#/properties/Lua.runtime.plugin" + }, + "special": { + "$ref": "#/properties/Lua.runtime.special" + }, + "unicodeName": { + "$ref": "#/properties/Lua.runtime.unicodeName" + }, + "version": { + "$ref": "#/properties/Lua.runtime.version" + } + } + }, "Lua.runtime.builtin": { "markdownDescription": "Adjust the enabled state of the built-in library. You can disable (or redefine) the non-existent library according to the actual runtime environment.\n\n* `default`: Indicates that the library will be enabled or disabled according to the runtime version\n* `enable`: always enable\n* `disable`: always disable\n", "properties": { @@ -1702,12 +1844,26 @@ "scope": "resource", "type": "string" }, + "Lua.signatureHelp": { + "properties": { + "enable": { + "$ref": "#/properties/Lua.signatureHelp.enable" + } + } + }, "Lua.signatureHelp.enable": { "default": true, "markdownDescription": "Enable signature help.", "scope": "resource", "type": "boolean" }, + "Lua.telemetry": { + "properties": { + "enable": { + "$ref": "#/properties/Lua.telemetry.enable" + } + } + }, "Lua.telemetry.enable": { "default": null, "markdownDescription": "Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://github.com/sumneko/lua-language-server/wiki/Privacy-Policy).\n", @@ -1717,6 +1873,16 @@ "null" ] }, + "Lua.window": { + "properties": { + "progressBar": { + "$ref": "#/properties/Lua.window.progressBar" + }, + "statusBar": { + "$ref": "#/properties/Lua.window.statusBar" + } + } + }, "Lua.window.progressBar": { "default": true, "markdownDescription": "Show progress bar in status bar.", @@ -1729,6 +1895,34 @@ "scope": "resource", "type": "boolean" }, + "Lua.workspace": { + "properties": { + "checkThirdParty": { + "$ref": "#/properties/Lua.workspace.checkThirdParty" + }, + "ignoreDir": { + "$ref": "#/properties/Lua.workspace.ignoreDir" + }, + "ignoreSubmodules": { + "$ref": "#/properties/Lua.workspace.ignoreSubmodules" + }, + "library": { + "$ref": "#/properties/Lua.workspace.library" + }, + "maxPreload": { + "$ref": "#/properties/Lua.workspace.maxPreload" + }, + "preloadFileSize": { + "$ref": "#/properties/Lua.workspace.preloadFileSize" + }, + "useGitIgnore": { + "$ref": "#/properties/Lua.workspace.useGitIgnore" + }, + "userThirdParty": { + "$ref": "#/properties/Lua.workspace.userThirdParty" + } + } + }, "Lua.workspace.checkThirdParty": { "default": true, "markdownDescription": "Automatic detection and adaptation of third-party libraries, currently supported libraries are:\n\n* OpenResty\n* Cocos4.0\n* LÖVE\n* Jass\n",