diff --git a/changelog.md b/changelog.md index 15e8f52ca1d25e9f81cd4f6e980f406d5ebd6dd1..bd0fe839d312fd04af2fc66a6418085822205041 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,9 @@ # changelog +## 3.7.4 +`2024-1-5` +* `FIX` rename to unicode with `Lua.runtime.unicodeName = true` + ## 3.7.3 `2023-11-14` * `FIX` can not infer arg type in some cases. diff --git a/package.json b/package.json index e58714df6f377f4e30a9200ba4468e1bab44f29d..2f8d008172cb33af98e978fc509579a97bec9a31 100644 --- a/package.json +++ b/package.json @@ -3343,5 +3343,5 @@ "sponsor": { "url": "https://github.com/LuaLS/lua-language-server/issues/484" }, - "version": "3.7.3" + "version": "3.7.4" } diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index dc9a8000a893f54b4aa39671db3198a06957d8aa..244661c638cb1237af3882ae942f10a87bbd2c27 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -2,7 +2,7 @@ "command.addon_manager.open": "Lua: 打开插件管理器...", "command.exportDocument": "Lua: 导出文档...", "command.reloadFFIMeta": "Lua: 重新生成luajit的FFI模块C语言元数据", - "config.addonManager.enable": "Whether the addon manager is enabled or not.", + "config.addonManager.enable": "是否启用扩展的附加插件管理器(Addon Manager)", "config.codeLens.enable": "启用代码度量。", "config.color.mode": "着色模式。", "config.color.mode.Grammar": "语法着色。", @@ -32,31 +32,31 @@ "config.develop.enable": "开发者模式。请勿开启,会影响性能。", "config.diagnostics.ambiguity": "* ambiguity-1\n* count-down-loop\n* different-requires\n* newfield-call\n* newline-call", "config.diagnostics.ambiguity-1": "优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` ", - "config.diagnostics.assign-type-mismatch": "Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable.", + "config.diagnostics.assign-type-mismatch": "值类型与赋值变量类型不匹配", "config.diagnostics.await": "* await-in-sync\n* not-yieldable", - "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.await-in-sync": "同步函数中异步函数调用", + "config.diagnostics.cast-local-type": "已显式定义变量类型与要定义的值的类型不匹配", + "config.diagnostics.cast-type-mismatch": "变量被转换为与其初始类型不匹配的类型", "config.diagnostics.circle-doc-class": "TODO: Needs documentation", - "config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", + "config.diagnostics.circular-doc-class": "两个类相互继承并互相循环", "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.code-after-break": "放在循环中break语句后面的代码", "config.diagnostics.codestyle": "* codestyle-check\n* name-style-check\n* spell-check", "config.diagnostics.codestyle-check": "Enable diagnostics for incorrectly styled lines.", "config.diagnostics.conventions": "* global-element", - "config.diagnostics.count-down-loop": "Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.", - "config.diagnostics.deprecated": "Enable diagnostics to highlight deprecated API.", - "config.diagnostics.different-requires": "Enable diagnostics for files which are required by two different paths.", + "config.diagnostics.count-down-loop": "for循环永远无法达到最大/极限值(在递减时递增)", + "config.diagnostics.deprecated": "变量已被标记为deprecated(过时)但仍在使用", + "config.diagnostics.different-requires": "required的同一个文件使用了两个不同的名字", "config.diagnostics.disable": "禁用的诊断(使用浮框括号内的代码)。", "config.diagnostics.disableScheme": "不诊断使用以下 scheme 的lua文件。", - "config.diagnostics.discard-returns": "Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.", - "config.diagnostics.doc-field-no-class": "Enable diagnostics to highlight a field annotation without a defining class annotation.", + "config.diagnostics.discard-returns": "函数的返回值被忽略(函数被`@nodiscard`标记时)", + "config.diagnostics.doc-field-no-class": "为不存在的类`@class`标记`@field`字段", "config.diagnostics.duplicate": "* duplicate-index\n* duplicate-set-field", - "config.diagnostics.duplicate-doc-alias": "Enable diagnostics for a duplicated alias annotation name.", - "config.diagnostics.duplicate-doc-field": "Enable diagnostics for a duplicated field annotation name.", - "config.diagnostics.duplicate-doc-param": "Enable diagnostics for a duplicated param annotation name.", + "config.diagnostics.duplicate-doc-alias": "`@alias`字段的名字冲突", + "config.diagnostics.duplicate-doc-field": "`@field`字段的名字冲突", + "config.diagnostics.duplicate-doc-param": "`@param`字段的名字冲突", "config.diagnostics.duplicate-index": "在字面量表中重复定义了索引", - "config.diagnostics.duplicate-set-field": "Enable diagnostics for setting the same field in a class more than once.", + "config.diagnostics.duplicate-set-field": "在一个类中多次定义同一字段", "config.diagnostics.empty-block": "空代码块", "config.diagnostics.enable": "启用诊断。", "config.diagnostics.global": "* global-in-nil-env\n* lowercase-global\n* undefined-env-child\n* undefined-global", @@ -69,9 +69,9 @@ "config.diagnostics.ignoredFiles.Disable": "不诊断这些文件。", "config.diagnostics.ignoredFiles.Enable": "总是诊断这些文件。", "config.diagnostics.ignoredFiles.Opened": "只有打开这些文件时才会诊断。", - "config.diagnostics.incomplete-signature-doc": "Incomplete @param or @return annotations for functions.", + "config.diagnostics.incomplete-signature-doc": "`@param`或`@return`的注释不完整", "config.diagnostics.inject-field": "TODO: Needs documentation", - "config.diagnostics.invisible": "Enable diagnostics for accesses to fields which are invisible.", + "config.diagnostics.invisible": "使用不可见的值", "config.diagnostics.libraryFiles": "如何诊断通过 `Lua.workspace.library` 加载的文件。", "config.diagnostics.libraryFiles.Disable": "不诊断这些文件。", "config.diagnostics.libraryFiles.Enable": "总是诊断这些文件。", @@ -79,26 +79,26 @@ "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* incomplete-signature-doc\n* missing-global-doc\n* missing-local-export-doc\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-fields": "TODO: Needs documentation", - "config.diagnostics.missing-global-doc": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", - "config.diagnostics.missing-local-export-doc": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.", - "config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", - "config.diagnostics.missing-return": "Enable diagnostics for functions with return annotations which have no return statement.", - "config.diagnostics.missing-return-value": "Enable diagnostics for return statements without values although the containing function declares returns.", - "config.diagnostics.name-style-check": "Enable diagnostics for name style.", - "config.diagnostics.need-check-nil": "Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.", + "config.diagnostics.missing-global-doc": "全局变量的注释缺失(全局函数必须为所有参数和返回值提供注释和注释)", + "config.diagnostics.missing-local-export-doc": "导出的本地函数缺少注释(导出的本地函数必须有包括本身以及所有参数和返回值的注释)", + "config.diagnostics.missing-parameter": "函数参数数少于注释函数参数数", + "config.diagnostics.missing-return": "函数带有返回注释而无返回语句", + "config.diagnostics.missing-return-value": "函数无值返回但函数使用`@return`标记了返回值", + "config.diagnostics.name-style-check": "变量的名称样式检查", + "config.diagnostics.need-check-nil": "变量之前被赋值为`nil`或可选值(可能为 `nil`)", "config.diagnostics.neededFileStatus": "* Opened: 只诊断打开的文件\n* Any: 诊断任何文件\n* None: 禁用此诊断\n\n以 `!` 结尾的设置优先级高于组设置 `diagnostics.groupFileStatus`。\n", "config.diagnostics.newfield-call": "在字面量表中,2行代码之间缺少分隔符,在语法上被解析为了一次索引操作", "config.diagnostics.newline-call": "以 `(` 开始的新行,在语法上被解析为了上一行的函数调用", - "config.diagnostics.no-unknown": "Enable diagnostics for cases in which the type cannot be inferred.", - "config.diagnostics.not-yieldable": "Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.", - "config.diagnostics.param-type-mismatch": "Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.", + "config.diagnostics.no-unknown": "变量的未知类型无法推断", + "config.diagnostics.not-yieldable": "不允许调用 `coroutine.yield()` ", + "config.diagnostics.param-type-mismatch": "给定参数的类型与函数定义所要求的类型(`@param`)不匹配", "config.diagnostics.redefined": "* redefined-local", "config.diagnostics.redefined-local": "重复定义的局部变量", "config.diagnostics.redundant-parameter": "函数调用时,传入了多余的参数", - "config.diagnostics.redundant-return": "Enable diagnostics for return statements which are not needed because the function would exit on its own.", - "config.diagnostics.redundant-return-value": "Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.", + "config.diagnostics.redundant-return": "当放置一个不需要的返回值时触发(函数会自行退出)", + "config.diagnostics.redundant-return-value": "返回`@return`注释未指定的额外值", "config.diagnostics.redundant-value": "赋值操作时,值的数量比被赋值的对象多", - "config.diagnostics.return-type-mismatch": "Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.", + "config.diagnostics.return-type-mismatch": "返回值的类型与`@return`中声明的类型不匹配", "config.diagnostics.severity": "修改诊断等级。\n以 `!` 结尾的设置优先级高于组设置 `diagnostics.groupSeverity`。\n", "config.diagnostics.spell-check": "Enable diagnostics for typos in strings.", "config.diagnostics.strict": "* close-non-object\n* deprecated\n* discard-returns\n* invisible", @@ -106,17 +106,17 @@ "config.diagnostics.trailing-space": "后置空格", "config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* inject-field\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", "config.diagnostics.unbalanced": "* missing-fields\n* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", - "config.diagnostics.unbalanced-assignments": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).", - "config.diagnostics.undefined-doc-class": "Enable diagnostics for class annotations in which an undefined class is referenced.", - "config.diagnostics.undefined-doc-name": "Enable diagnostics for type annotations referencing an undefined type or alias.", - "config.diagnostics.undefined-doc-param": "Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.", + "config.diagnostics.unbalanced-assignments": "多重赋值时没有赋值所有变量(如`local x,y = 1`)", + "config.diagnostics.undefined-doc-class": "在`@class`注解中引用未定义的类。", + "config.diagnostics.undefined-doc-name": "在`@type`注解中引用未定义的类型或`@alias`", + "config.diagnostics.undefined-doc-param": "函数声明中`@param`引用了未定义的参数", "config.diagnostics.undefined-env-child": "`_ENV` 被设置为了新的字面量表,但是试图获取的全局变量不再这张表中", - "config.diagnostics.undefined-field": "Enable diagnostics for cases in which an undefined field of a variable is read.", + "config.diagnostics.undefined-field": "引用变量的未定义字段", "config.diagnostics.undefined-global": "未定义的全局变量", - "config.diagnostics.unknown-cast-variable": "Enable diagnostics for casts of undefined variables.", - "config.diagnostics.unknown-diag-code": "Enable diagnostics in cases in which an unknown diagnostics code is entered.", - "config.diagnostics.unknown-operator": "Enable diagnostics for unknown operators.", - "config.diagnostics.unreachable-code": "Enable diagnostics for unreachable code.", + "config.diagnostics.unknown-cast-variable": "使用`@cast`对未定义变量的强制转换", + "config.diagnostics.unknown-diag-code": "未知的诊断代码", + "config.diagnostics.unknown-operator": "未知的运算符", + "config.diagnostics.unreachable-code": "不可达的代码", "config.diagnostics.unused": "* code-after-break\n* empty-block\n* redundant-return\n* trailing-space\n* unreachable-code\n* unused-function\n* unused-label\n* unused-local\n* unused-vararg", "config.diagnostics.unused-function": "未使用的函数", "config.diagnostics.unused-label": "未使用的标签", @@ -213,10 +213,10 @@ "config.type.castNumberToInteger": "允许将 `number` 类型赋给 `integer` 类型。", "config.type.weakNilCheck": "对联合类型进行类型检查时,忽略其中的 `nil`。\n\n此设置为 `false` 时,`numer|nil` 类型无法赋给 `number` 类型;为 `true` 是则可以。\n", "config.type.weakUnionCheck": "联合类型中只要有一个子类型满足条件,则联合类型也满足条件。\n\n此设置为 `false` 时,`number|boolean` 类型无法赋给 `number` 类型;为 `true` 时则可以。\n", - "config.typeFormat.config": "Configures the formatting behavior while typing Lua code.", - "config.typeFormat.config.auto_complete_end": "Controls if `end` is automatically completed at suitable positions.", - "config.typeFormat.config.auto_complete_table_sep": "Controls if a separator is automatically appended at the end of a table declaration.", - "config.typeFormat.config.format_line": "Controls if a line is formatted at all.", + "config.typeFormat.config": "配置输入Lua代码时的格式化行为", + "config.typeFormat.config.auto_complete_end": "是否在合适的位置自动完成 `end`", + "config.typeFormat.config.auto_complete_table_sep": "是否在table末尾自动添加分隔符", + "config.typeFormat.config.format_line": "是否对某一行进行格式化", "config.window.progressBar": "在状态栏显示进度条。", "config.window.statusBar": "在状态栏显示插件状态。", "config.workspace.checkThirdParty": "自动检测与适配第三方库,目前支持的库为:\n\n* OpenResty\n* Cocos4.0\n* LÖVE\n* LÖVR\n* skynet\n* Jass\n", diff --git a/package/build.lua b/package/build.lua index 7eb3b6da7d29d9ba0c450ab6e92b1bf247d76888..7fe544b50ddcfc6f5c00621dc0b8b00fbd7c59ee 100644 --- a/package/build.lua +++ b/package/build.lua @@ -1,6 +1,6 @@ local json = require 'json-beautify' -local VERSION = "3.7.3" +local VERSION = "3.7.4" local package = require 'package.package' local fsu = require 'fs-utility' diff --git a/server b/server index 50dfc81e075be5fe2cdf7b2b94007dd5ed2edefa..34ff9d3ca730bc28879ab2b0c1a49f2c5480f9a3 160000 --- a/server +++ b/server @@ -1 +1 @@ -Subproject commit 50dfc81e075be5fe2cdf7b2b94007dd5ed2edefa +Subproject commit 34ff9d3ca730bc28879ab2b0c1a49f2c5480f9a3 diff --git a/setting/schema-zh-cn.json b/setting/schema-zh-cn.json index b04d711a2546d535a64ea59e3979a1cf9da09af5..e58d3fd1728017ddfc69fe14046b7263e2b6ab08 100644 --- a/setting/schema-zh-cn.json +++ b/setting/schema-zh-cn.json @@ -10,7 +10,7 @@ }, "addonManager.enable": { "default": true, - "markdownDescription": "Whether the addon manager is enabled or not.", + "markdownDescription": "是否启用扩展的附加插件管理器(Addon Manager)", "scope": "resource", "type": "boolean" }, @@ -733,7 +733,7 @@ }, "assign-type-mismatch": { "default": "Opened", - "description": "Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable.", + "description": "值类型与赋值变量类型不匹配", "enum": [ "Any", "Opened", @@ -746,7 +746,7 @@ }, "await-in-sync": { "default": "None", - "description": "Enable diagnostics for calls of asynchronous functions within a synchronous function.", + "description": "同步函数中异步函数调用", "enum": [ "Any", "Opened", @@ -759,7 +759,7 @@ }, "cast-local-type": { "default": "Opened", - "description": "Enable diagnostics for casts of local variables where the target type does not match the defined type.", + "description": "已显式定义变量类型与要定义的值的类型不匹配", "enum": [ "Any", "Opened", @@ -772,7 +772,7 @@ }, "cast-type-mismatch": { "default": "Opened", - "description": "Enable diagnostics for casts where the target type does not match the initial type.", + "description": "变量被转换为与其初始类型不匹配的类型", "enum": [ "Any", "Opened", @@ -811,7 +811,7 @@ }, "code-after-break": { "default": "Opened", - "description": "Enable diagnostics for code placed after a break statement in a loop.", + "description": "放在循环中break语句后面的代码", "enum": [ "Any", "Opened", @@ -837,7 +837,7 @@ }, "count-down-loop": { "default": "Any", - "description": "Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.", + "description": "for循环永远无法达到最大/极限值(在递减时递增)", "enum": [ "Any", "Opened", @@ -850,7 +850,7 @@ }, "deprecated": { "default": "Any", - "description": "Enable diagnostics to highlight deprecated API.", + "description": "变量已被标记为deprecated(过时)但仍在使用", "enum": [ "Any", "Opened", @@ -863,7 +863,7 @@ }, "different-requires": { "default": "Any", - "description": "Enable diagnostics for files which are required by two different paths.", + "description": "required的同一个文件使用了两个不同的名字", "enum": [ "Any", "Opened", @@ -876,7 +876,7 @@ }, "discard-returns": { "default": "Any", - "description": "Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.", + "description": "函数的返回值被忽略(函数被`@nodiscard`标记时)", "enum": [ "Any", "Opened", @@ -889,7 +889,7 @@ }, "doc-field-no-class": { "default": "Any", - "description": "Enable diagnostics to highlight a field annotation without a defining class annotation.", + "description": "为不存在的类`@class`标记`@field`字段", "enum": [ "Any", "Opened", @@ -902,7 +902,7 @@ }, "duplicate-doc-alias": { "default": "Any", - "description": "Enable diagnostics for a duplicated alias annotation name.", + "description": "`@alias`字段的名字冲突", "enum": [ "Any", "Opened", @@ -915,7 +915,7 @@ }, "duplicate-doc-field": { "default": "Any", - "description": "Enable diagnostics for a duplicated field annotation name.", + "description": "`@field`字段的名字冲突", "enum": [ "Any", "Opened", @@ -928,7 +928,7 @@ }, "duplicate-doc-param": { "default": "Any", - "description": "Enable diagnostics for a duplicated param annotation name.", + "description": "`@param`字段的名字冲突", "enum": [ "Any", "Opened", @@ -954,7 +954,7 @@ }, "duplicate-set-field": { "default": "Opened", - "description": "Enable diagnostics for setting the same field in a class more than once.", + "description": "在一个类中多次定义同一字段", "enum": [ "Any", "Opened", @@ -1006,7 +1006,7 @@ }, "incomplete-signature-doc": { "default": "None", - "description": "Incomplete @param or @return annotations for functions.", + "description": "`@param`或`@return`的注释不完整", "enum": [ "Any", "Opened", @@ -1032,7 +1032,7 @@ }, "invisible": { "default": "Any", - "description": "Enable diagnostics for accesses to fields which are invisible.", + "description": "使用不可见的值", "enum": [ "Any", "Opened", @@ -1071,7 +1071,7 @@ }, "missing-global-doc": { "default": "None", - "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", + "description": "全局变量的注释缺失(全局函数必须为所有参数和返回值提供注释和注释)", "enum": [ "Any", "Opened", @@ -1084,7 +1084,7 @@ }, "missing-local-export-doc": { "default": "None", - "description": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.", + "description": "导出的本地函数缺少注释(导出的本地函数必须有包括本身以及所有参数和返回值的注释)", "enum": [ "Any", "Opened", @@ -1097,7 +1097,7 @@ }, "missing-parameter": { "default": "Any", - "description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", + "description": "函数参数数少于注释函数参数数", "enum": [ "Any", "Opened", @@ -1110,7 +1110,7 @@ }, "missing-return": { "default": "Any", - "description": "Enable diagnostics for functions with return annotations which have no return statement.", + "description": "函数带有返回注释而无返回语句", "enum": [ "Any", "Opened", @@ -1123,7 +1123,7 @@ }, "missing-return-value": { "default": "Any", - "description": "Enable diagnostics for return statements without values although the containing function declares returns.", + "description": "函数无值返回但函数使用`@return`标记了返回值", "enum": [ "Any", "Opened", @@ -1136,7 +1136,7 @@ }, "name-style-check": { "default": "None", - "description": "Enable diagnostics for name style.", + "description": "变量的名称样式检查", "enum": [ "Any", "Opened", @@ -1149,7 +1149,7 @@ }, "need-check-nil": { "default": "Opened", - "description": "Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.", + "description": "变量之前被赋值为`nil`或可选值(可能为 `nil`)", "enum": [ "Any", "Opened", @@ -1188,7 +1188,7 @@ }, "no-unknown": { "default": "None", - "description": "Enable diagnostics for cases in which the type cannot be inferred.", + "description": "变量的未知类型无法推断", "enum": [ "Any", "Opened", @@ -1201,7 +1201,7 @@ }, "not-yieldable": { "default": "None", - "description": "Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.", + "description": "不允许调用 `coroutine.yield()` ", "enum": [ "Any", "Opened", @@ -1214,7 +1214,7 @@ }, "param-type-mismatch": { "default": "Opened", - "description": "Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.", + "description": "给定参数的类型与函数定义所要求的类型(`@param`)不匹配", "enum": [ "Any", "Opened", @@ -1253,7 +1253,7 @@ }, "redundant-return": { "default": "Opened", - "description": "Enable diagnostics for return statements which are not needed because the function would exit on its own.", + "description": "当放置一个不需要的返回值时触发(函数会自行退出)", "enum": [ "Any", "Opened", @@ -1266,7 +1266,7 @@ }, "redundant-return-value": { "default": "Any", - "description": "Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.", + "description": "返回`@return`注释未指定的额外值", "enum": [ "Any", "Opened", @@ -1292,7 +1292,7 @@ }, "return-type-mismatch": { "default": "Opened", - "description": "Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.", + "description": "返回值的类型与`@return`中声明的类型不匹配", "enum": [ "Any", "Opened", @@ -1331,7 +1331,7 @@ }, "unbalanced-assignments": { "default": "Any", - "description": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).", + "description": "多重赋值时没有赋值所有变量(如`local x,y = 1`)", "enum": [ "Any", "Opened", @@ -1344,7 +1344,7 @@ }, "undefined-doc-class": { "default": "Any", - "description": "Enable diagnostics for class annotations in which an undefined class is referenced.", + "description": "在`@class`注解中引用未定义的类。", "enum": [ "Any", "Opened", @@ -1357,7 +1357,7 @@ }, "undefined-doc-name": { "default": "Any", - "description": "Enable diagnostics for type annotations referencing an undefined type or alias.", + "description": "在`@type`注解中引用未定义的类型或`@alias`", "enum": [ "Any", "Opened", @@ -1370,7 +1370,7 @@ }, "undefined-doc-param": { "default": "Any", - "description": "Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.", + "description": "函数声明中`@param`引用了未定义的参数", "enum": [ "Any", "Opened", @@ -1396,7 +1396,7 @@ }, "undefined-field": { "default": "Opened", - "description": "Enable diagnostics for cases in which an undefined field of a variable is read.", + "description": "引用变量的未定义字段", "enum": [ "Any", "Opened", @@ -1422,7 +1422,7 @@ }, "unknown-cast-variable": { "default": "Any", - "description": "Enable diagnostics for casts of undefined variables.", + "description": "使用`@cast`对未定义变量的强制转换", "enum": [ "Any", "Opened", @@ -1435,7 +1435,7 @@ }, "unknown-diag-code": { "default": "Any", - "description": "Enable diagnostics in cases in which an unknown diagnostics code is entered.", + "description": "未知的诊断代码", "enum": [ "Any", "Opened", @@ -1448,7 +1448,7 @@ }, "unknown-operator": { "default": "Any", - "description": "Enable diagnostics for unknown operators.", + "description": "未知的运算符", "enum": [ "Any", "Opened", @@ -1461,7 +1461,7 @@ }, "unreachable-code": { "default": "Opened", - "description": "Enable diagnostics for unreachable code.", + "description": "不可达的代码", "enum": [ "Any", "Opened", @@ -1550,7 +1550,7 @@ }, "assign-type-mismatch": { "default": "Warning", - "description": "Enable diagnostics for assignments in which the value's type does not match the type of the assigned variable.", + "description": "值类型与赋值变量类型不匹配", "enum": [ "Error", "Warning", @@ -1565,7 +1565,7 @@ }, "await-in-sync": { "default": "Warning", - "description": "Enable diagnostics for calls of asynchronous functions within a synchronous function.", + "description": "同步函数中异步函数调用", "enum": [ "Error", "Warning", @@ -1580,7 +1580,7 @@ }, "cast-local-type": { "default": "Warning", - "description": "Enable diagnostics for casts of local variables where the target type does not match the defined type.", + "description": "已显式定义变量类型与要定义的值的类型不匹配", "enum": [ "Error", "Warning", @@ -1595,7 +1595,7 @@ }, "cast-type-mismatch": { "default": "Warning", - "description": "Enable diagnostics for casts where the target type does not match the initial type.", + "description": "变量被转换为与其初始类型不匹配的类型", "enum": [ "Error", "Warning", @@ -1640,7 +1640,7 @@ }, "code-after-break": { "default": "Hint", - "description": "Enable diagnostics for code placed after a break statement in a loop.", + "description": "放在循环中break语句后面的代码", "enum": [ "Error", "Warning", @@ -1670,7 +1670,7 @@ }, "count-down-loop": { "default": "Warning", - "description": "Enable diagnostics for `for` loops which will never reach their max/limit because the loop is incrementing instead of decrementing.", + "description": "for循环永远无法达到最大/极限值(在递减时递增)", "enum": [ "Error", "Warning", @@ -1685,7 +1685,7 @@ }, "deprecated": { "default": "Warning", - "description": "Enable diagnostics to highlight deprecated API.", + "description": "变量已被标记为deprecated(过时)但仍在使用", "enum": [ "Error", "Warning", @@ -1700,7 +1700,7 @@ }, "different-requires": { "default": "Warning", - "description": "Enable diagnostics for files which are required by two different paths.", + "description": "required的同一个文件使用了两个不同的名字", "enum": [ "Error", "Warning", @@ -1715,7 +1715,7 @@ }, "discard-returns": { "default": "Warning", - "description": "Enable diagnostics for calls of functions annotated with `---@nodiscard` where the return values are ignored.", + "description": "函数的返回值被忽略(函数被`@nodiscard`标记时)", "enum": [ "Error", "Warning", @@ -1730,7 +1730,7 @@ }, "doc-field-no-class": { "default": "Warning", - "description": "Enable diagnostics to highlight a field annotation without a defining class annotation.", + "description": "为不存在的类`@class`标记`@field`字段", "enum": [ "Error", "Warning", @@ -1745,7 +1745,7 @@ }, "duplicate-doc-alias": { "default": "Warning", - "description": "Enable diagnostics for a duplicated alias annotation name.", + "description": "`@alias`字段的名字冲突", "enum": [ "Error", "Warning", @@ -1760,7 +1760,7 @@ }, "duplicate-doc-field": { "default": "Warning", - "description": "Enable diagnostics for a duplicated field annotation name.", + "description": "`@field`字段的名字冲突", "enum": [ "Error", "Warning", @@ -1775,7 +1775,7 @@ }, "duplicate-doc-param": { "default": "Warning", - "description": "Enable diagnostics for a duplicated param annotation name.", + "description": "`@param`字段的名字冲突", "enum": [ "Error", "Warning", @@ -1805,7 +1805,7 @@ }, "duplicate-set-field": { "default": "Warning", - "description": "Enable diagnostics for setting the same field in a class more than once.", + "description": "在一个类中多次定义同一字段", "enum": [ "Error", "Warning", @@ -1865,7 +1865,7 @@ }, "incomplete-signature-doc": { "default": "Warning", - "description": "Incomplete @param or @return annotations for functions.", + "description": "`@param`或`@return`的注释不完整", "enum": [ "Error", "Warning", @@ -1895,7 +1895,7 @@ }, "invisible": { "default": "Warning", - "description": "Enable diagnostics for accesses to fields which are invisible.", + "description": "使用不可见的值", "enum": [ "Error", "Warning", @@ -1940,7 +1940,7 @@ }, "missing-global-doc": { "default": "Warning", - "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", + "description": "全局变量的注释缺失(全局函数必须为所有参数和返回值提供注释和注释)", "enum": [ "Error", "Warning", @@ -1955,7 +1955,7 @@ }, "missing-local-export-doc": { "default": "Warning", - "description": "Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values.", + "description": "导出的本地函数缺少注释(导出的本地函数必须有包括本身以及所有参数和返回值的注释)", "enum": [ "Error", "Warning", @@ -1970,7 +1970,7 @@ }, "missing-parameter": { "default": "Warning", - "description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", + "description": "函数参数数少于注释函数参数数", "enum": [ "Error", "Warning", @@ -1985,7 +1985,7 @@ }, "missing-return": { "default": "Warning", - "description": "Enable diagnostics for functions with return annotations which have no return statement.", + "description": "函数带有返回注释而无返回语句", "enum": [ "Error", "Warning", @@ -2000,7 +2000,7 @@ }, "missing-return-value": { "default": "Warning", - "description": "Enable diagnostics for return statements without values although the containing function declares returns.", + "description": "函数无值返回但函数使用`@return`标记了返回值", "enum": [ "Error", "Warning", @@ -2015,7 +2015,7 @@ }, "name-style-check": { "default": "Warning", - "description": "Enable diagnostics for name style.", + "description": "变量的名称样式检查", "enum": [ "Error", "Warning", @@ -2030,7 +2030,7 @@ }, "need-check-nil": { "default": "Warning", - "description": "Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.", + "description": "变量之前被赋值为`nil`或可选值(可能为 `nil`)", "enum": [ "Error", "Warning", @@ -2075,7 +2075,7 @@ }, "no-unknown": { "default": "Warning", - "description": "Enable diagnostics for cases in which the type cannot be inferred.", + "description": "变量的未知类型无法推断", "enum": [ "Error", "Warning", @@ -2090,7 +2090,7 @@ }, "not-yieldable": { "default": "Warning", - "description": "Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.", + "description": "不允许调用 `coroutine.yield()` ", "enum": [ "Error", "Warning", @@ -2105,7 +2105,7 @@ }, "param-type-mismatch": { "default": "Warning", - "description": "Enable diagnostics for function calls where the type of a provided parameter does not match the type of the annotated function definition.", + "description": "给定参数的类型与函数定义所要求的类型(`@param`)不匹配", "enum": [ "Error", "Warning", @@ -2150,7 +2150,7 @@ }, "redundant-return": { "default": "Hint", - "description": "Enable diagnostics for return statements which are not needed because the function would exit on its own.", + "description": "当放置一个不需要的返回值时触发(函数会自行退出)", "enum": [ "Error", "Warning", @@ -2165,7 +2165,7 @@ }, "redundant-return-value": { "default": "Warning", - "description": "Enable diagnostics for return statements which return an extra value which is not specified by a return annotation.", + "description": "返回`@return`注释未指定的额外值", "enum": [ "Error", "Warning", @@ -2195,7 +2195,7 @@ }, "return-type-mismatch": { "default": "Warning", - "description": "Enable diagnostics for return values whose type does not match the type declared in the corresponding return annotation.", + "description": "返回值的类型与`@return`中声明的类型不匹配", "enum": [ "Error", "Warning", @@ -2240,7 +2240,7 @@ }, "unbalanced-assignments": { "default": "Warning", - "description": "Enable diagnostics on multiple assignments if not all variables obtain a value (e.g., `local x,y = 1`).", + "description": "多重赋值时没有赋值所有变量(如`local x,y = 1`)", "enum": [ "Error", "Warning", @@ -2255,7 +2255,7 @@ }, "undefined-doc-class": { "default": "Warning", - "description": "Enable diagnostics for class annotations in which an undefined class is referenced.", + "description": "在`@class`注解中引用未定义的类。", "enum": [ "Error", "Warning", @@ -2270,7 +2270,7 @@ }, "undefined-doc-name": { "default": "Warning", - "description": "Enable diagnostics for type annotations referencing an undefined type or alias.", + "description": "在`@type`注解中引用未定义的类型或`@alias`", "enum": [ "Error", "Warning", @@ -2285,7 +2285,7 @@ }, "undefined-doc-param": { "default": "Warning", - "description": "Enable diagnostics for cases in which a parameter annotation is given without declaring the parameter in the function definition.", + "description": "函数声明中`@param`引用了未定义的参数", "enum": [ "Error", "Warning", @@ -2315,7 +2315,7 @@ }, "undefined-field": { "default": "Warning", - "description": "Enable diagnostics for cases in which an undefined field of a variable is read.", + "description": "引用变量的未定义字段", "enum": [ "Error", "Warning", @@ -2345,7 +2345,7 @@ }, "unknown-cast-variable": { "default": "Warning", - "description": "Enable diagnostics for casts of undefined variables.", + "description": "使用`@cast`对未定义变量的强制转换", "enum": [ "Error", "Warning", @@ -2360,7 +2360,7 @@ }, "unknown-diag-code": { "default": "Warning", - "description": "Enable diagnostics in cases in which an unknown diagnostics code is entered.", + "description": "未知的诊断代码", "enum": [ "Error", "Warning", @@ -2375,7 +2375,7 @@ }, "unknown-operator": { "default": "Warning", - "description": "Enable diagnostics for unknown operators.", + "description": "未知的运算符", "enum": [ "Error", "Warning", @@ -2390,7 +2390,7 @@ }, "unreachable-code": { "default": "Hint", - "description": "Enable diagnostics for unreachable code.", + "description": "不可达的代码", "enum": [ "Error", "Warning", @@ -3284,21 +3284,21 @@ }, "typeFormat.config": { "additionalProperties": false, - "markdownDescription": "Configures the formatting behavior while typing Lua code.", + "markdownDescription": "配置输入Lua代码时的格式化行为", "properties": { "auto_complete_end": { "default": "true", - "description": "Controls if `end` is automatically completed at suitable positions.", + "description": "是否在合适的位置自动完成 `end`", "type": "string" }, "auto_complete_table_sep": { "default": "true", - "description": "Controls if a separator is automatically appended at the end of a table declaration.", + "description": "是否在table末尾自动添加分隔符", "type": "string" }, "format_line": { "default": "true", - "description": "Controls if a line is formatted at all.", + "description": "是否对某一行进行格式化", "type": "string" } },