diff --git a/.gitignore b/.gitignore index aa7ec1d9f6a93d8ea0fad921d7dc212258c17207..2131474cc70d73f7283a079fd6aa6212745a0577 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ /client/node_modules -/client/out/*.map +/client/out/ /publish/ /luadoc/out/ /ovsx-token diff --git a/README.md b/README.md index 78be3e36d2a81ce44f4308393aaf903e717cfdb0..c04229075db188d549fe3510dd3c170b2d685043 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ # lua-language-server  -[](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) - - +[](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) + + [](https://github.com/sumneko/lua-language-server/issues "Average time to resolve an issue") diff --git a/changelog.md b/changelog.md index 72e813be141cd2f26007fe551684be40b61afc2b..74c7f1604e8542c055d1396848ddbeee3e1d1171 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,41 @@ # changelog -`2022-11-29` +## 3.6.5 +`2023-1-16` +* `NEW` support casting global variables +* `NEW` code lens: this feature is disabled by default. +* `NEW` settings: + * `Lua.codeLens.enable`: Enable code lens. +* `CHG` improve memory usage for large libraries +* `CHG` definition: supports finding definitions for `@class` and `@alias`, since they may be defined multi times +* `CHG` rename: supports `@field` +* `CHG` improve patch for `.luarc.json` +* `CHG` `---@meta [name]`: once declared `name`, user can only require this file by declared name. meta file can not be required with name `_` +* `CHG` remove telemetry +* `FIX` [#831] +* `FIX` [#1729] +* `FIX` [#1737] +* `FIX` [#1751] +* `FIX` [#1767] +* `FIX` [#1796] +* `FIX` [#1805] +* `FIX` [#1808] +* `FIX` [#1811] +* `FIX` [#1824] + +[#831]: https://github.com/sumneko/lua-language-server/issues/831 +[#1729]: https://github.com/sumneko/lua-language-server/issues/1729 +[#1737]: https://github.com/sumneko/lua-language-server/issues/1737 +[#1751]: https://github.com/sumneko/lua-language-server/issues/1751 +[#1767]: https://github.com/sumneko/lua-language-server/issues/1767 +[#1796]: https://github.com/sumneko/lua-language-server/issues/1796 +[#1805]: https://github.com/sumneko/lua-language-server/issues/1805 +[#1808]: https://github.com/sumneko/lua-language-server/issues/1808 +[#1811]: https://github.com/sumneko/lua-language-server/issues/1811 +[#1824]: https://github.com/sumneko/lua-language-server/issues/1824 + ## 3.6.4 +`2022-11-29` * `NEW` modify `require` after renaming files * `FIX` circulation reference in process analysis ```lua diff --git a/package.json b/package.json index 84203c8b2f80e859d624700d0c2a20d36147bffc..2b5f858af3d1efce33ac0180892287514dc67a72 100644 --- a/package.json +++ b/package.json @@ -29,6 +29,12 @@ ], "configuration": { "properties": { + "Lua.codeLens.enable": { + "default": false, + "markdownDescription": "%config.codeLens.enable%", + "scope": "resource", + "type": "boolean" + }, "Lua.completion.autoRequire": { "default": true, "markdownDescription": "%config.completion.autoRequire%", @@ -207,6 +213,7 @@ "missing-return-value", "need-check-nil", "need-paren", + "nesting-long-mark", "newfield-call", "newline-call", "no-unknown", @@ -2229,7 +2236,7 @@ }, "Lua.format.defaultConfig": { "additionalProperties": false, - "default": {}, + "default": [], "markdownDescription": "%config.format.defaultConfig%", "patternProperties": { ".*": { @@ -2654,7 +2661,7 @@ }, "Lua.runtime.special": { "additionalProperties": false, - "default": {}, + "default": [], "markdownDescription": "%config.runtime.special%", "patternProperties": { ".*": { @@ -2745,18 +2752,6 @@ "scope": "resource", "type": "array" }, - "Lua.telemetry.enable": { - "default": null, - "markdownDescription": "%config.telemetry.enable%", - "scope": "resource", - "tags": [ - "telemetry" - ], - "type": [ - "boolean", - "null" - ] - }, "Lua.type.castNumberToInteger": { "default": true, "markdownDescription": "%config.type.castNumberToInteger%", @@ -3068,5 +3063,5 @@ "sponsor": { "url": "https://github.com/sumneko/lua-language-server/issues/484" }, - "version": "3.6.4" + "version": "3.6.5" } diff --git a/package.nls.json b/package.nls.json index d3cfe11740145e960a6f1c4040f20f4d13ea0fa7..945704757ba351cd652ffc82edae9c51675383af 100644 --- a/package.nls.json +++ b/package.nls.json @@ -3,6 +3,7 @@ "config.IntelliSense.traceFieldInject": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", "config.IntelliSense.traceLocalSet": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", "config.IntelliSense.traceReturn": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", + "config.codeLens.enable": "Enable code lens.", "config.color.mode": "Color mode.", "config.color.mode.Grammar": "Grammar color.", "config.color.mode.Semantic": "Semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.", @@ -36,7 +37,7 @@ "config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.", "config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.", "config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.", - "config.diagnostics.circle-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", + "config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", "config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.", "config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.", "config.diagnostics.codestyle": "* codestyle-check\n* spell-check", @@ -154,10 +155,6 @@ "config.misc.parameters": "[Command line parameters](https://github.com/sumneko/lua-telemetry-server/tree/master/method) when starting the language server in VSCode.", "config.runtime.builtin": "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", "config.runtime.fileEncoding": "File encoding. The `ansi` option is only available under the `Windows` platform.", - "config.runtime.fileEncoding.utf8" : "utf8", - "config.runtime.fileEncoding.ansi": "ansi", - "config.runtime.fileEncoding.utf16le" : "utf16le", - "config.runtime.fileEncoding.utf16be": "utf16be", "config.runtime.meta": "Format of the directory name of the meta files.", "config.runtime.nonstandardSymbol": "Supports non-standard symbols. Make sure that your runtime environment supports these symbols.", "config.runtime.path": "When using `require`, how to find the file based on the input name.\nSetting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files.\nif `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched.\nIf you want to load files outside the workspace, you need to set `Lua.workspace.library` first.\n", diff --git a/package.nls.pt-br.json b/package.nls.pt-br.json index ca7b3b3d203c03e2fe0ad58bea3d734f52388327..7a8ee8401d4caec233924c1efffaa2f58e957897 100644 --- a/package.nls.pt-br.json +++ b/package.nls.pt-br.json @@ -3,6 +3,7 @@ "config.IntelliSense.traceFieldInject": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", "config.IntelliSense.traceLocalSet": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", "config.IntelliSense.traceReturn": "Please read [wiki](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", + "config.codeLens.enable": "Enable code lens.", "config.color.mode": "Color mode.", "config.color.mode.Grammar": "Grammar color.", "config.color.mode.Semantic": "Semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.", @@ -36,7 +37,7 @@ "config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.", "config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.", "config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.", - "config.diagnostics.circle-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", + "config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", "config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.", "config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.", "config.diagnostics.codestyle": "* codestyle-check\n* spell-check", @@ -65,11 +66,11 @@ "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.invisible": "Enable diagnostics for accesses to fields which are invisible.", "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.invisible": "Enable diagnostics for accesses to fields which are invisible.", "config.diagnostics.lowercase-global": "首字母小写的全局变量定义", "config.diagnostics.luadoc": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator", "config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -154,10 +155,6 @@ "config.misc.parameters": "[Command line parameters](https://github.com/sumneko/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.", "config.runtime.builtin": "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", "config.runtime.fileEncoding": "File encoding. The `ansi` option is only available under the `Windows` platform.", - "config.runtime.fileEncoding.utf8" : "utf8", - "config.runtime.fileEncoding.ansi": "ansi", - "config.runtime.fileEncoding.utf16le" : "utf16le", - "config.runtime.fileEncoding.utf16be": "utf16be", "config.runtime.meta": "Format of the directory name of the meta files.", "config.runtime.nonstandardSymbol": "Supports non-standard symbols. Make sure that your runtime environment supports these symbols.", "config.runtime.path": "When using `require`, how to find the file based on the input name.\nSetting this config to `?/init.lua` means that when you enter `require 'myfile'`, `${workspace}/myfile/init.lua` will be searched from the loaded files.\nif `runtime.pathStrict` is `false`, `${workspace}/**/myfile/init.lua` will also be searched.\nIf you want to load files outside the workspace, you need to set `Lua.workspace.library` first.\n", diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index 78052b79304f8787c9d6fdf078abaf208a4c90ee..fa5c5badee394ab3e95fe69bac0d82e0cbfc41e5 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -3,6 +3,7 @@ "config.IntelliSense.traceFieldInject": "请查阅[文档](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", "config.IntelliSense.traceLocalSet": "请查阅[文档](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", "config.IntelliSense.traceReturn": "请查阅[文档](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", + "config.codeLens.enable": "启用代码度量。", "config.color.mode": "着色模式。", "config.color.mode.Grammar": "语法着色。", "config.color.mode.Semantic": "语义着色。你可能需要同时将 `editor.semanticHighlighting.enabled` 设置为 `true` 才能生效。", @@ -36,7 +37,7 @@ "config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.", "config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.", "config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.", - "config.diagnostics.circle-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", + "config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", "config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.", "config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.", "config.diagnostics.codestyle": "* codestyle-check\n* spell-check", @@ -65,11 +66,11 @@ "config.diagnostics.ignoredFiles.Disable": "不诊断这些文件。", "config.diagnostics.ignoredFiles.Enable": "总是诊断这些文件。", "config.diagnostics.ignoredFiles.Opened": "只有打开这些文件时才会诊断。", + "config.diagnostics.invisible": "Enable diagnostics for accesses to fields which are invisible.", "config.diagnostics.libraryFiles": "如何诊断通过 `Lua.workspace.library` 加载的文件。", "config.diagnostics.libraryFiles.Disable": "不诊断这些文件。", "config.diagnostics.libraryFiles.Enable": "总是诊断这些文件。", "config.diagnostics.libraryFiles.Opened": "只有打开这些文件时才会诊断。", - "config.diagnostics.invisible": "Enable diagnostics for accesses to fields which are invisible.", "config.diagnostics.lowercase-global": "首字母小写的全局变量定义", "config.diagnostics.luadoc": "* circle-doc-class\n* doc-field-no-class\n* duplicate-doc-alias\n* duplicate-doc-field\n* duplicate-doc-param\n* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator", "config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -154,10 +155,6 @@ "config.misc.parameters": "VSCode中启动语言服务时的[命令行参数](https://github.com/sumneko/lua-language-server/wiki/Getting-Started#arguments)。", "config.runtime.builtin": "调整内置库的启用状态,你可以根据实际运行环境禁用掉不存在的库(或重新定义)。\n\n* `default`: 表示库会根据运行版本启用或禁用\n* `enable`: 总是启用\n* `disable`: 总是禁用\n", "config.runtime.fileEncoding": "文件编码,`ansi` 选项只在 `Windows` 平台下有效。", - "config.runtime.fileEncoding.utf8" : "utf8", - "config.runtime.fileEncoding.ansi": "ansi", - "config.runtime.fileEncoding.utf16le" : "utf16le", - "config.runtime.fileEncoding.utf16be": "utf16be", "config.runtime.meta": "meta文件的目录名称格式。", "config.runtime.nonstandardSymbol": "支持非标准的符号。请务必确认你的运行环境支持这些符号。", "config.runtime.path": "当使用 `require` 时,如何根据输入的名字来查找文件。\n此选项设置为 `?/init.lua` 意味着当你输入 `require 'myfile'` 时,会从已加载的文件中搜索 `{workspace}/myfile/init.lua`。\n当 `runtime.pathStrict` 设置为 `false` 时,还会尝试搜索 `${workspace}/**/myfile/init.lua`。\n如果你想要加载工作区以外的文件,你需要先设置 `Lua.workspace.library`。\n", diff --git a/package.nls.zh-tw.json b/package.nls.zh-tw.json index 3f34bd059946483c368e55e127a94036444c055a..468d1e3202179d335e005d02a66d038f39f6509c 100644 --- a/package.nls.zh-tw.json +++ b/package.nls.zh-tw.json @@ -3,6 +3,7 @@ "config.IntelliSense.traceFieldInject": "請查閱[文件](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", "config.IntelliSense.traceLocalSet": "請查閱[文件](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", "config.IntelliSense.traceReturn": "請查閱[文件](https://github.com/sumneko/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", + "config.codeLens.enable": "Enable code lens.", "config.color.mode": "著色模式。", "config.color.mode.Grammar": "語法著色。", "config.color.mode.Semantic": "語義著色。你可能需要同時將 `editor.semanticHighlighting.enabled` 設定為 `true` 才能生效。", @@ -36,7 +37,7 @@ "config.diagnostics.await-in-sync": "Enable diagnostics for calls of asynchronous functions within a synchronous function.", "config.diagnostics.cast-local-type": "Enable diagnostics for casts of local variables where the target type does not match the defined type.", "config.diagnostics.cast-type-mismatch": "Enable diagnostics for casts where the target type does not match the initial type.", - "config.diagnostics.circle-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", + "config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", "config.diagnostics.close-non-object": "Enable diagnostics for attempts to close a variable with a non-object.", "config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.", "config.diagnostics.codestyle": "* codestyle-check\n* spell-check", @@ -154,10 +155,6 @@ "config.misc.parameters": "VSCode中啟動語言伺服時的[命令列參數](https://github.com/sumneko/lua-language-server/wiki/Getting-Started#arguments)。", "config.runtime.builtin": "調整內建庫的啟用狀態,你可以根據實際執行環境停用(或重新定義)不存在的庫。\n\n* `default`: 表示庫會根據執行版本啟用或停用\n* `enable`: 總是啟用\n* `disable`: 總是停用\n", "config.runtime.fileEncoding": "檔案編碼,選項 `ansi` 只在 `Windows` 平台下有效。", - "config.runtime.fileEncoding.utf8" : "utf8", - "config.runtime.fileEncoding.ansi": "ansi", - "config.runtime.fileEncoding.utf16le" : "utf16le", - "config.runtime.fileEncoding.utf16be": "utf16be", "config.runtime.meta": "meta檔案的目錄名稱格式", "config.runtime.nonstandardSymbol": "支援非標準的符號。請務必確認你的執行環境支援這些符號。", "config.runtime.path": "當使用 `require` 時,如何根據輸入的名字來尋找檔案。\n此選項設定為 `?/init.lua` 意味著當你輸入 `require 'myfile'` 時,會從已載入的檔案中搜尋 `{workspace}/myfile/init.lua`。\n當 `runtime.pathStrict` 設定為 `false` 時,還會嘗試搜尋 `${workspace}/**/myfile/init.lua`。\n如果你想要載入工作區以外的檔案,你需要先設定 `Lua.workspace.library`。\n", diff --git a/package/build.lua b/package/build.lua index 2e380d5cca755645c7e49a6f0355ca95bb8a91b9..8e1889efbe798e278edbc6919dfcfef06be49b87 100644 --- a/package/build.lua +++ b/package/build.lua @@ -1,6 +1,6 @@ local json = require 'json-beautify' -local VERSION = "3.6.4" +local VERSION = "3.6.5" local package = require 'package.package' local fsu = require 'fs-utility' diff --git a/server b/server index 8132f4c9da02858c23813d15c2cb6ded6df57ea1..c06b7cac7013ed3166c6ccafe4409b0d174b37a9 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 8132f4c9da02858c23813d15c2cb6ded6df57ea1 +Subproject commit c06b7cac7013ed3166c6ccafe4409b0d174b37a9 diff --git a/setting/schema-pt-br.json b/setting/schema-pt-br.json index 6c866cb264d320e4efa7d4094bb3e903e53404b1..15399adcf1b117b9314073475cc3c15fd3185593 100644 --- a/setting/schema-pt-br.json +++ b/setting/schema-pt-br.json @@ -1,6 +1,19 @@ { "description": "Setting of sumneko.lua", "properties": { + "codeLens": { + "properties": { + "enable": { + "$ref": "#/properties/codeLens.enable" + } + } + }, + "codeLens.enable": { + "default": false, + "markdownDescription": "Enable code lens.", + "scope": "resource", + "type": "boolean" + }, "completion": { "properties": { "autoRequire": { @@ -259,6 +272,7 @@ "missing-return-value", "need-check-nil", "need-paren", + "nesting-long-mark", "newfield-call", "newline-call", "no-unknown", @@ -936,7 +950,7 @@ }, "invisible": { "default": "Any", - "description": "%config.diagnostics.invisible%", + "description": "Enable diagnostics for accesses to fields which are invisible.", "enum": [ "Any", "Opened", @@ -1702,7 +1716,7 @@ }, "invisible": { "default": "Warning", - "description": "%config.diagnostics.invisible%", + "description": "Enable diagnostics for accesses to fields which are invisible.", "enum": [ "Error", "Warning", @@ -2304,7 +2318,7 @@ }, "format.defaultConfig": { "additionalProperties": false, - "default": {}, + "default": [], "markdownDescription": "The default format configuration. Has a lower priority than `.editorconfig` file in the workspace.\nRead [formatter docs](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs) to learn usage.\n", "patternProperties": { ".*": { @@ -2826,7 +2840,7 @@ }, "runtime.special": { "additionalProperties": false, - "default": {}, + "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": { ".*": { @@ -2947,25 +2961,6 @@ "scope": "resource", "type": "array" }, - "telemetry": { - "properties": { - "enable": { - "$ref": "#/properties/telemetry.enable" - } - } - }, - "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/Home#privacy).\n", - "scope": "resource", - "tags": [ - "telemetry" - ], - "type": [ - "boolean", - "null" - ] - }, "type": { "properties": { "castNumberToInteger": { @@ -3006,21 +3001,21 @@ }, "typeFormat.config": { "additionalProperties": false, - "markdownDescription": "%config.typeFormat.config%", + "markdownDescription": "Configures the formatting behavior while typing Lua code.", "properties": { "auto_complete_end": { "default": "true", - "description": "%config.typeFormat.config.auto_complete_end%", + "description": "Controls if `end` is automatically completed at suitable positions.", "type": "string" }, "auto_complete_table_sep": { "default": "true", - "description": "%config.typeFormat.config.auto_complete_table_sep%", + "description": "Controls if a separator is automatically appended at the end of a table declaration.", "type": "string" }, "format_line": { "default": "true", - "description": "%config.typeFormat.config.format_line%", + "description": "Controls if a line is formatted at all.", "type": "string" } }, diff --git a/setting/schema-zh-cn.json b/setting/schema-zh-cn.json index 42e71263ac4b3b6f2f9c2c9cf505f699327cb783..60a6dc8a4fabac94fc926c225639f3aebce9d068 100644 --- a/setting/schema-zh-cn.json +++ b/setting/schema-zh-cn.json @@ -1,6 +1,19 @@ { "description": "Setting of sumneko.lua", "properties": { + "codeLens": { + "properties": { + "enable": { + "$ref": "#/properties/codeLens.enable" + } + } + }, + "codeLens.enable": { + "default": false, + "markdownDescription": "启用代码度量。", + "scope": "resource", + "type": "boolean" + }, "completion": { "properties": { "autoRequire": { @@ -259,6 +272,7 @@ "missing-return-value", "need-check-nil", "need-paren", + "nesting-long-mark", "newfield-call", "newline-call", "no-unknown", @@ -936,7 +950,7 @@ }, "invisible": { "default": "Any", - "description": "%config.diagnostics.invisible%", + "description": "Enable diagnostics for accesses to fields which are invisible.", "enum": [ "Any", "Opened", @@ -1702,7 +1716,7 @@ }, "invisible": { "default": "Warning", - "description": "%config.diagnostics.invisible%", + "description": "Enable diagnostics for accesses to fields which are invisible.", "enum": [ "Error", "Warning", @@ -2304,7 +2318,7 @@ }, "format.defaultConfig": { "additionalProperties": false, - "default": {}, + "default": [], "markdownDescription": "默认的格式化配置,优先级低于工作区内的 `.editorconfig` 文件。\n请查阅[格式化文档](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs)了解用法。\n", "patternProperties": { ".*": { @@ -2826,7 +2840,7 @@ }, "runtime.special": { "additionalProperties": false, - "default": {}, + "default": [], "markdownDescription": "将自定义全局变量视为一些特殊的内置变量,语言服务将提供特殊的支持。\n下面这个例子表示将 `include` 视为 `require` 。\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n", "patternProperties": { ".*": { @@ -2947,25 +2961,6 @@ "scope": "resource", "type": "array" }, - "telemetry": { - "properties": { - "enable": { - "$ref": "#/properties/telemetry.enable" - } - } - }, - "telemetry.enable": { - "default": null, - "markdownDescription": "启用遥测,通过网络发送你的编辑器信息与错误日志。在[此处](https://github.com/sumneko/lua-language-server/wiki/Home#privacy)阅读我们的隐私声明。\n", - "scope": "resource", - "tags": [ - "telemetry" - ], - "type": [ - "boolean", - "null" - ] - }, "type": { "properties": { "castNumberToInteger": { @@ -3006,21 +3001,21 @@ }, "typeFormat.config": { "additionalProperties": false, - "markdownDescription": "%config.typeFormat.config%", + "markdownDescription": "Configures the formatting behavior while typing Lua code.", "properties": { "auto_complete_end": { "default": "true", - "description": "%config.typeFormat.config.auto_complete_end%", + "description": "Controls if `end` is automatically completed at suitable positions.", "type": "string" }, "auto_complete_table_sep": { "default": "true", - "description": "%config.typeFormat.config.auto_complete_table_sep%", + "description": "Controls if a separator is automatically appended at the end of a table declaration.", "type": "string" }, "format_line": { "default": "true", - "description": "%config.typeFormat.config.format_line%", + "description": "Controls if a line is formatted at all.", "type": "string" } }, diff --git a/setting/schema-zh-tw.json b/setting/schema-zh-tw.json index 5eddeb00da3dad7bb72c9b1d5a1c9e8ee36bbd54..dc6d1ac0f37dbef4255a33c8989133816842026d 100644 --- a/setting/schema-zh-tw.json +++ b/setting/schema-zh-tw.json @@ -1,6 +1,19 @@ { "description": "Setting of sumneko.lua", "properties": { + "codeLens": { + "properties": { + "enable": { + "$ref": "#/properties/codeLens.enable" + } + } + }, + "codeLens.enable": { + "default": false, + "markdownDescription": "Enable code lens.", + "scope": "resource", + "type": "boolean" + }, "completion": { "properties": { "autoRequire": { @@ -259,6 +272,7 @@ "missing-return-value", "need-check-nil", "need-paren", + "nesting-long-mark", "newfield-call", "newline-call", "no-unknown", @@ -936,7 +950,7 @@ }, "invisible": { "default": "Any", - "description": "%config.diagnostics.invisible%", + "description": "Enable diagnostics for accesses to fields which are invisible.", "enum": [ "Any", "Opened", @@ -1702,7 +1716,7 @@ }, "invisible": { "default": "Warning", - "description": "%config.diagnostics.invisible%", + "description": "Enable diagnostics for accesses to fields which are invisible.", "enum": [ "Error", "Warning", @@ -2304,7 +2318,7 @@ }, "format.defaultConfig": { "additionalProperties": false, - "default": {}, + "default": [], "markdownDescription": "預設的格式化組態,優先順序低於工作區內的 `.editorconfig` 檔案。\n請查閱[格式化文件](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs)了解用法。\n", "patternProperties": { ".*": { @@ -2826,7 +2840,7 @@ }, "runtime.special": { "additionalProperties": false, - "default": {}, + "default": [], "markdownDescription": "將自訂全域變數視為一些特殊的內建變數,語言伺服將提供特殊的支援。\n下面這個例子表示將 `include` 視為 `require` 。\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n", "patternProperties": { ".*": { @@ -2947,25 +2961,6 @@ "scope": "resource", "type": "array" }, - "telemetry": { - "properties": { - "enable": { - "$ref": "#/properties/telemetry.enable" - } - } - }, - "telemetry.enable": { - "default": null, - "markdownDescription": "啟用遙測,透過網路發送你的編輯器資訊與錯誤日誌。在[此處](https://github.com/sumneko/lua-language-server/wiki/Home#privacy)閱讀我們的隱私聲明。\n", - "scope": "resource", - "tags": [ - "telemetry" - ], - "type": [ - "boolean", - "null" - ] - }, "type": { "properties": { "castNumberToInteger": { @@ -3006,21 +3001,21 @@ }, "typeFormat.config": { "additionalProperties": false, - "markdownDescription": "%config.typeFormat.config%", + "markdownDescription": "Configures the formatting behavior while typing Lua code.", "properties": { "auto_complete_end": { "default": "true", - "description": "%config.typeFormat.config.auto_complete_end%", + "description": "Controls if `end` is automatically completed at suitable positions.", "type": "string" }, "auto_complete_table_sep": { "default": "true", - "description": "%config.typeFormat.config.auto_complete_table_sep%", + "description": "Controls if a separator is automatically appended at the end of a table declaration.", "type": "string" }, "format_line": { "default": "true", - "description": "%config.typeFormat.config.format_line%", + "description": "Controls if a line is formatted at all.", "type": "string" } }, diff --git a/setting/schema.json b/setting/schema.json index c83d347e1959b8bcd4adf2d4f3693c323eb0851c..1f347ae4501bda7e6c518482c30225a050751538 100644 --- a/setting/schema.json +++ b/setting/schema.json @@ -1,6 +1,19 @@ { "description": "Setting of sumneko.lua", "properties": { + "codeLens": { + "properties": { + "enable": { + "$ref": "#/properties/codeLens.enable" + } + } + }, + "codeLens.enable": { + "default": false, + "markdownDescription": "Enable code lens.", + "scope": "resource", + "type": "boolean" + }, "completion": { "properties": { "autoRequire": { @@ -259,6 +272,7 @@ "missing-return-value", "need-check-nil", "need-paren", + "nesting-long-mark", "newfield-call", "newline-call", "no-unknown", @@ -936,7 +950,7 @@ }, "invisible": { "default": "Any", - "description": "%config.diagnostics.invisible%", + "description": "Enable diagnostics for accesses to fields which are invisible.", "enum": [ "Any", "Opened", @@ -1702,7 +1716,7 @@ }, "invisible": { "default": "Warning", - "description": "%config.diagnostics.invisible%", + "description": "Enable diagnostics for accesses to fields which are invisible.", "enum": [ "Error", "Warning", @@ -2304,7 +2318,7 @@ }, "format.defaultConfig": { "additionalProperties": false, - "default": {}, + "default": [], "markdownDescription": "The default format configuration. Has a lower priority than `.editorconfig` file in the workspace.\nRead [formatter docs](https://github.com/CppCXY/EmmyLuaCodeStyle/tree/master/docs) to learn usage.\n", "patternProperties": { ".*": { @@ -2826,7 +2840,7 @@ }, "runtime.special": { "additionalProperties": false, - "default": {}, + "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": { ".*": { @@ -2947,25 +2961,6 @@ "scope": "resource", "type": "array" }, - "telemetry": { - "properties": { - "enable": { - "$ref": "#/properties/telemetry.enable" - } - } - }, - "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/Home#privacy).\n", - "scope": "resource", - "tags": [ - "telemetry" - ], - "type": [ - "boolean", - "null" - ] - }, "type": { "properties": { "castNumberToInteger": { @@ -3006,21 +3001,21 @@ }, "typeFormat.config": { "additionalProperties": false, - "markdownDescription": "%config.typeFormat.config%", + "markdownDescription": "Configures the formatting behavior while typing Lua code.", "properties": { "auto_complete_end": { "default": "true", - "description": "%config.typeFormat.config.auto_complete_end%", + "description": "Controls if `end` is automatically completed at suitable positions.", "type": "string" }, "auto_complete_table_sep": { "default": "true", - "description": "%config.typeFormat.config.auto_complete_table_sep%", + "description": "Controls if a separator is automatically appended at the end of a table declaration.", "type": "string" }, "format_line": { "default": "true", - "description": "%config.typeFormat.config.format_line%", + "description": "Controls if a line is formatted at all.", "type": "string" } },