From d2a08abb38a413dddd19edb69971d2b0657bff6f Mon Sep 17 00:00:00 2001 From: Thomas Wetzlmaier Date: Thu, 11 May 2023 16:32:53 +0200 Subject: Annotation rule for exported local functions Annotation for the following local function func1 is required. local mod = { } local function func1() end mod.Func1 = func1 return mod; --- doc/zh-cn/config.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'doc/zh-cn') diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 9ddffb9e..532b584a 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -286,6 +286,7 @@ Array * ``"miss-space-between"`` * ``"miss-symbol"`` * ``"missing-global-doc"`` +* ``"missing-local-export-doc"`` * ``"missing-parameter"`` * ``"missing-return"`` * ``"missing-return-value"`` @@ -453,6 +454,7 @@ object * duplicate-doc-param * incomplete-signature-doc * missing-global-doc + * missing-local-export-doc * undefined-doc-class * undefined-doc-name * undefined-doc-param @@ -578,6 +580,7 @@ object * duplicate-doc-param * incomplete-signature-doc * missing-global-doc + * missing-local-export-doc * undefined-doc-class * undefined-doc-name * undefined-doc-param @@ -814,6 +817,10 @@ object */ "missing-global-doc": "None", /* + Enable diagnostics for exported local function definitions which are not fully annotated. + */ + "missing-local-export-doc": "None", + /* Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters. */ "missing-parameter": "Any", @@ -1073,6 +1080,10 @@ object */ "missing-global-doc": "Warning", /* + Enable diagnostics for exported local function definitions which are not annotated. + */ + "missing-local-export-doc": "Warning", + /* Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters. */ "missing-parameter": "Warning", -- cgit v1.2.3 From 2372d6ee9cdf34cb0feb78a32f5b82f8b9074d9f Mon Sep 17 00:00:00 2001 From: fesily Date: Mon, 15 May 2023 15:52:23 +0800 Subject: move other file --- doc/zh-cn/config.md | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc/zh-cn') diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 9ddffb9e..3563b62f 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -1664,6 +1664,8 @@ object "ffi": "default", "io": "default", "jit": "default", + "jit.profile": "default", + "jit.util": "default", "math": "default", "os": "default", "package": "default", -- cgit v1.2.3 From a8ea07192788c26f13baf4391c84a2d703b56812 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 19 Jul 2023 16:42:03 +0800 Subject: make 3rds --- doc/zh-cn/config.md | 71 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 57 insertions(+), 14 deletions(-) (limited to 'doc/zh-cn') diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index ef094599..54caf6c7 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -1,3 +1,19 @@ +# addonManager.enable + +Whether the addon manager is enabled or not. + +## type + +```ts +boolean +``` + +## default + +```jsonc +true +``` + # codeLens.enable 启用代码度量。 @@ -290,6 +306,7 @@ Array * ``"missing-parameter"`` * ``"missing-return"`` * ``"missing-return-value"`` +* ``"name-style-check"`` * ``"need-check-nil"`` * ``"need-paren"`` * ``"nesting-long-mark"`` @@ -431,10 +448,15 @@ object "await": "Fallback", /* * codestyle-check + * name-style-check * spell-check */ "codestyle": "Fallback", /* + * global-element + */ + "conventions": "Fallback", + /* * duplicate-index * duplicate-set-field */ @@ -475,10 +497,6 @@ object */ "strict": "Fallback", /* - * global-element - */ - "conventions": "None", - /* * no-unknown */ "strong": "Fallback", @@ -557,10 +575,15 @@ object "await": "Fallback", /* * codestyle-check + * name-style-check * spell-check */ "codestyle": "Fallback", /* + * global-element + */ + "conventions": "Fallback", + /* * duplicate-index * duplicate-set-field */ @@ -601,10 +624,6 @@ object */ "strict": "Fallback", /* - * global-element - */ - "conventions": "Fallback", - /* * no-unknown */ "strong": "Fallback", @@ -801,7 +820,7 @@ object */ "global-in-nil-env": "Any", /* - Enable diagnostics for function definitions which are not fully annotated. + Incomplete @param or @return annotations for functions. */ "incomplete-signature-doc": "None", /* @@ -813,11 +832,11 @@ object */ "lowercase-global": "Any", /* - Enable diagnostics for global function definitions which are not fully annotated. + Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values. */ "missing-global-doc": "None", /* - Enable diagnostics for exported local function definitions which are not fully annotated. + Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values. */ "missing-local-export-doc": "None", /* @@ -833,6 +852,10 @@ object */ "missing-return-value": "Any", /* + Enable diagnostics for name style. + */ + "name-style-check": "None", + /* Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before. */ "need-check-nil": "Opened", @@ -1064,7 +1087,7 @@ object */ "global-in-nil-env": "Warning", /* - Enable diagnostics for function definitions which are not fully annotated. + Incomplete @param or @return annotations for functions. */ "incomplete-signature-doc": "Warning", /* @@ -1076,11 +1099,11 @@ object */ "lowercase-global": "Information", /* - Enable diagnostics for global function definitions which are not annotated. + Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values. */ "missing-global-doc": "Warning", /* - Enable diagnostics for exported local function definitions which are not annotated. + Missing annotations for exported locals! Exported local functions must have a comment and annotations for all parameters and return values. */ "missing-local-export-doc": "Warning", /* @@ -1096,6 +1119,10 @@ object */ "missing-return-value": "Warning", /* + Enable diagnostics for name style. + */ + "name-style-check": "Warning", + /* Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before. */ "need-check-nil": "Warning", @@ -1641,6 +1668,22 @@ Array [] ``` +# nameStyle.config + +设定命名风格检查的配置 + +## type + +```ts +Object +``` + +## default + +```jsonc +{} +``` + # runtime.builtin 调整内置库的启用状态,你可以根据实际运行环境禁用掉不存在的库(或重新定义)。 -- cgit v1.2.3 From e50b20f07f44de64667143984f2ea0564db09ff7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Fri, 21 Jul 2023 14:11:06 +0800 Subject: fix doc --- doc/zh-cn/config.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'doc/zh-cn') diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 54caf6c7..692b5a91 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -301,6 +301,7 @@ Array * ``"miss-sep-in-table"`` * ``"miss-space-between"`` * ``"miss-symbol"`` +* ``"missing-fields"`` * ``"missing-global-doc"`` * ``"missing-local-export-doc"`` * ``"missing-parameter"`` @@ -511,6 +512,7 @@ object */ "type-check": "Fallback", /* + * missing-fields * missing-parameter * missing-return * missing-return-value @@ -638,6 +640,7 @@ object */ "type-check": "Fallback", /* + * missing-fields * missing-parameter * missing-return * missing-return-value @@ -831,6 +834,7 @@ object 首字母小写的全局变量定义 */ "lowercase-global": "Any", + "missing-fields": "Any", /* Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values. */ @@ -1098,6 +1102,7 @@ object 首字母小写的全局变量定义 */ "lowercase-global": "Information", + "missing-fields": "Warning", /* Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values. */ @@ -1675,7 +1680,7 @@ Array ## type ```ts -Object +Object ``` ## default -- cgit v1.2.3 From 3899160724e488f194c7844e819a649445f0dd57 Mon Sep 17 00:00:00 2001 From: carsakiller Date: Thu, 10 Aug 2023 23:29:50 -0400 Subject: chore: replace wiki references --- doc/zh-cn/config.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'doc/zh-cn') diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 692b5a91..bf33501d 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -738,7 +738,7 @@ object ```jsonc { /* - 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` + 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` */ "ambiguity-1": "Any", /* @@ -1006,7 +1006,7 @@ object ```jsonc { /* - 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` + 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` */ "ambiguity-1": "Warning", /* @@ -1659,7 +1659,7 @@ string # misc.parameters -VSCode中启动语言服务时的[命令行参数](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#arguments)。 +VSCode中启动语言服务时的[命令行参数](https://luals.github.io/wiki/usage/#arguments)。 ## type @@ -1852,7 +1852,7 @@ false # runtime.plugin -插件路径,请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/Plugins)了解用法。 +插件路径,请查阅[文档](https://luals.github.io/wiki/plugins)了解用法。 ## type @@ -2290,4 +2290,4 @@ Array ```jsonc [] -``` \ No newline at end of file +``` -- cgit v1.2.3 From 9f54935bc1447c07a29a3fc4357a0dcbafd36a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Wed, 11 Oct 2023 10:48:36 +0800 Subject: update doc and locale --- doc/zh-cn/config.md | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'doc/zh-cn') diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index bf33501d..26b54ad5 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -258,6 +258,7 @@ Array * ``"global-in-nil-env"`` * ``"incomplete-signature-doc"`` * ``"index-in-func-name"`` +* ``"inject-field"`` * ``"invisible"`` * ``"jump-local-scope"`` * ``"keyword"`` @@ -505,6 +506,7 @@ object * assign-type-mismatch * cast-local-type * cast-type-mismatch + * inject-field * need-check-nil * param-type-mismatch * return-type-mismatch @@ -633,6 +635,7 @@ object * assign-type-mismatch * cast-local-type * cast-type-mismatch + * inject-field * need-check-nil * param-type-mismatch * return-type-mismatch @@ -738,7 +741,7 @@ object ```jsonc { /* - 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` + 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` */ "ambiguity-1": "Any", /* @@ -826,6 +829,7 @@ object Incomplete @param or @return annotations for functions. */ "incomplete-signature-doc": "None", + "inject-field": "Opened", /* Enable diagnostics for accesses to fields which are invisible. */ @@ -1006,7 +1010,7 @@ object ```jsonc { /* - 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` + 优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1` */ "ambiguity-1": "Warning", /* @@ -1094,6 +1098,7 @@ object Incomplete @param or @return annotations for functions. */ "incomplete-signature-doc": "Warning", + "inject-field": "Warning", /* Enable diagnostics for accesses to fields which are invisible. */ @@ -1659,7 +1664,7 @@ string # misc.parameters -VSCode中启动语言服务时的[命令行参数](https://luals.github.io/wiki/usage/#arguments)。 +VSCode中启动语言服务时的[命令行参数](https://luals.github.io/wiki/usage#arguments)。 ## type @@ -2290,4 +2295,4 @@ Array ```jsonc [] -``` +``` \ No newline at end of file -- cgit v1.2.3 From 5f7b0a3dd4ae5ff346ea5cfd1436ae9d54f00474 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Sat, 30 Sep 2023 15:09:00 -0700 Subject: Make `workspace.checkThirdParty` a string enum This lets you skip the "apply third party library to workspace configuration" prompt. --- doc/zh-cn/config.md | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'doc/zh-cn') diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 26b54ad5..1866fb82 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -2172,17 +2172,25 @@ true * skynet * Jass +Value can be one of: +* `Ask` (ask every time) +* `Apply` (always apply third-party libraries and set the workspace + configuration) +* `ApplyInMemory` (always apply third-party libraries but don't set the + workspace configuration) +* `Disable` (don't ask and don't apply) + ## type ```ts -boolean +string ``` ## default ```jsonc -true +"Ask" ``` # workspace.ignoreDir -- cgit v1.2.3 From 3bbc8dd579dadd67171c758c1065f271c5816133 Mon Sep 17 00:00:00 2001 From: Rebecca Turner Date: Wed, 11 Oct 2023 13:39:32 -0700 Subject: Update `doc` and `locale` --- doc/zh-cn/config.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'doc/zh-cn') diff --git a/doc/zh-cn/config.md b/doc/zh-cn/config.md index 1866fb82..ebb8325f 100644 --- a/doc/zh-cn/config.md +++ b/doc/zh-cn/config.md @@ -2172,14 +2172,6 @@ true * skynet * Jass -Value can be one of: -* `Ask` (ask every time) -* `Apply` (always apply third-party libraries and set the workspace - configuration) -* `ApplyInMemory` (always apply third-party libraries but don't set the - workspace configuration) -* `Disable` (don't ask and don't apply) - ## type @@ -2187,6 +2179,13 @@ Value can be one of: string ``` +## enum + +* ``"Ask"`` +* ``"Apply"`` +* ``"ApplyInMemory"`` +* ``"Disable"`` + ## default ```jsonc -- cgit v1.2.3