diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-06-25 03:27:13 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-06-25 03:27:13 +0800 |
commit | 91068747651bdd30a3ca436e25a39ec09fba0545 (patch) | |
tree | 88955bfbe8931632721c76db2cc6718bb5c61d5b /doc/zh-tw | |
parent | d6bf75a27de064e2d05659faf8526fc51dd0384e (diff) | |
download | lua-language-server-91068747651bdd30a3ca436e25a39ec09fba0545.zip |
make doc with description of groups
Diffstat (limited to 'doc/zh-tw')
-rw-r--r-- | doc/zh-tw/config.md | 392 |
1 files changed, 320 insertions, 72 deletions
diff --git a/doc/zh-tw/config.md b/doc/zh-tw/config.md index c1f93e41..57b28cac 100644 --- a/doc/zh-tw/config.md +++ b/doc/zh-tw/config.md @@ -10,7 +10,7 @@ boolean ## default -```json +```jsonc true ``` @@ -32,7 +32,7 @@ string ## default -```json +```jsonc "Disable" ``` @@ -48,7 +48,7 @@ integer ## default -```json +```jsonc 0 ``` @@ -64,7 +64,7 @@ boolean ## default -```json +```jsonc true ``` @@ -86,7 +86,7 @@ string ## default -```json +```jsonc "Replace" ``` @@ -102,7 +102,7 @@ string ## default -```json +```jsonc "@" ``` @@ -118,7 +118,7 @@ string ## default -```json +```jsonc "." ``` @@ -134,7 +134,7 @@ boolean ## default -```json +```jsonc true ``` @@ -156,7 +156,7 @@ string ## default -```json +```jsonc "Fallback" ``` @@ -172,7 +172,7 @@ boolean ## default -```json +```jsonc true ``` @@ -188,7 +188,7 @@ Array<string> ## default -```json +```jsonc [] ``` @@ -204,7 +204,7 @@ Array<string> ## default -```json +```jsonc ["git"] ``` @@ -220,7 +220,7 @@ boolean ## default -```json +```jsonc true ``` @@ -236,7 +236,7 @@ Array<string> ## default -```json +```jsonc [] ``` @@ -267,19 +267,92 @@ object<string, string> ## default -```json +```jsonc { + /* + * ambiguity-1 + * count-down-loop + * different-requires + * newfield-call + * newline-call + */ "ambiguity": "Fallback", + /* + * await-in-sync + * not-yieldable + */ "await": "Fallback", + /* + * codestyle-check + * spell-check + */ "codestyle": "Fallback", + /* + * duplicate-index + * duplicate-set-field + */ "duplicate": "Fallback", + /* + * global-in-nil-env + * lowercase-global + * undefined-env-child + * undefined-global + */ "global": "Fallback", + /* + * cast-type-mismatch + * circle-doc-class + * doc-field-no-class + * duplicate-doc-alias + * duplicate-doc-field + * duplicate-doc-param + * undefined-doc-class + * undefined-doc-name + * undefined-doc-param + * unknown-cast-variable + * unknown-diag-code + */ "luadoc": "Fallback", - "no-unknown": "Fallback", + /* + * redefined-local + */ "redefined": "Fallback", + /* + * close-non-object + * deprecated + * discard-returns + */ "strict": "Fallback", + /* + * no-unknown + */ + "strong": "Fallback", + /* + * assign-type-mismatch + * cast-local-type + * cast-type-mismatch + * need-check-nil + * param-type-mismatch + * undefined-field + */ "type-check": "Fallback", + /* + * missing-parameter + * redundant-parameter + * redundant-value + * unbalanced-assignments + */ "unbalanced": "Fallback", + /* + * code-after-break + * empty-block + * redundant-return + * trailing-space + * unused-function + * unused-label + * unused-local + * unused-vararg + */ "unused": "Fallback" } ``` @@ -307,19 +380,92 @@ object<string, string> ## default -```json +```jsonc { + /* + * ambiguity-1 + * count-down-loop + * different-requires + * newfield-call + * newline-call + */ "ambiguity": "Fallback", + /* + * await-in-sync + * not-yieldable + */ "await": "Fallback", + /* + * codestyle-check + * spell-check + */ "codestyle": "Fallback", + /* + * duplicate-index + * duplicate-set-field + */ "duplicate": "Fallback", + /* + * global-in-nil-env + * lowercase-global + * undefined-env-child + * undefined-global + */ "global": "Fallback", + /* + * cast-type-mismatch + * circle-doc-class + * doc-field-no-class + * duplicate-doc-alias + * duplicate-doc-field + * duplicate-doc-param + * undefined-doc-class + * undefined-doc-name + * undefined-doc-param + * unknown-cast-variable + * unknown-diag-code + */ "luadoc": "Fallback", - "no-unknown": "Fallback", + /* + * redefined-local + */ "redefined": "Fallback", + /* + * close-non-object + * deprecated + * discard-returns + */ "strict": "Fallback", + /* + * no-unknown + */ + "strong": "Fallback", + /* + * assign-type-mismatch + * cast-local-type + * cast-type-mismatch + * need-check-nil + * param-type-mismatch + * undefined-field + */ "type-check": "Fallback", + /* + * missing-parameter + * redundant-parameter + * redundant-value + * unbalanced-assignments + */ "unbalanced": "Fallback", + /* + * code-after-break + * empty-block + * redundant-return + * trailing-space + * unused-function + * unused-label + * unused-local + * unused-vararg + */ "unused": "Fallback" } ``` @@ -342,7 +488,7 @@ string ## default -```json +```jsonc "Opened" ``` @@ -364,7 +510,7 @@ string ## default -```json +```jsonc "Opened" ``` @@ -394,8 +540,11 @@ object<string, string> ## default -```json +```jsonc { + /* + 優先順序歧義,如: `num or 0 + 1` ,推測使用者的實際期望為 `(num or 0) + 1` + */ "ambiguity-1": "Any", "assign-type-mismatch": "Opened", "await-in-sync": "None", @@ -413,36 +562,84 @@ object<string, string> "duplicate-doc-alias": "Any", "duplicate-doc-field": "Any", "duplicate-doc-param": "Any", + /* + 在字面常數表中重複定義了索引 + */ "duplicate-index": "Any", "duplicate-set-field": "Any", + /* + 空程式碼區塊 + */ "empty-block": "Opened", + /* + 不能使用全域變數( `_ENV` 被設定為 `nil`) + */ "global-in-nil-env": "Any", + /* + 首字母小寫的全域變數定義 + */ "lowercase-global": "Any", "missing-parameter": "Any", "need-check-nil": "Opened", + /* + 在字面常數表中,2行程式碼之間缺少分隔符,在語法上被解析為了一次索引操作 + */ "newfield-call": "Any", + /* + 以 `(` 開始的新行,在語法上被解析為了上一行的函式呼叫 + */ "newline-call": "Any", "no-unknown": "None", "not-yieldable": "None", "param-type-mismatch": "Opened", + /* + 重複定義的區域變數 + */ "redefined-local": "Opened", + /* + 函式呼叫時,傳入了多餘的引數 + */ "redundant-parameter": "Any", "redundant-return": "Opened", + /* + 賦值操作時,值的數量比被賦值的對象多 + */ "redundant-value": "Any", "spell-check": "None", + /* + 後置空格 + */ "trailing-space": "Opened", "unbalanced-assignments": "Any", "undefined-doc-class": "Any", "undefined-doc-name": "Any", "undefined-doc-param": "Any", + /* + `_ENV` 被設定為了新的字面常數表,但是試圖獲取的全域變數不在這張表中 + */ "undefined-env-child": "Any", "undefined-field": "Opened", + /* + 未定義的全域變數 + */ "undefined-global": "Any", "unknown-cast-variable": "Any", "unknown-diag-code": "Any", + /* + 未使用的函式 + */ "unused-function": "Opened", + /* + 未使用的標籤 + */ "unused-label": "Opened", + /* + 未使用的區域變數 + */ "unused-local": "Opened", + /* + 未使用的不定引數 + */ "unused-vararg": "Opened" } ``` @@ -472,8 +669,11 @@ object<string, string> ## default -```json +```jsonc { + /* + 優先順序歧義,如: `num or 0 + 1` ,推測使用者的實際期望為 `(num or 0) + 1` + */ "ambiguity-1": "Warning", "assign-type-mismatch": "Warning", "await-in-sync": "Warning", @@ -491,43 +691,91 @@ object<string, string> "duplicate-doc-alias": "Warning", "duplicate-doc-field": "Warning", "duplicate-doc-param": "Warning", + /* + 在字面常數表中重複定義了索引 + */ "duplicate-index": "Warning", "duplicate-set-field": "Warning", + /* + 空程式碼區塊 + */ "empty-block": "Hint", + /* + 不能使用全域變數( `_ENV` 被設定為 `nil`) + */ "global-in-nil-env": "Warning", + /* + 首字母小寫的全域變數定義 + */ "lowercase-global": "Information", "missing-parameter": "Warning", "need-check-nil": "Warning", + /* + 在字面常數表中,2行程式碼之間缺少分隔符,在語法上被解析為了一次索引操作 + */ "newfield-call": "Warning", + /* + 以 `(` 開始的新行,在語法上被解析為了上一行的函式呼叫 + */ "newline-call": "Warning", "no-unknown": "Warning", "not-yieldable": "Warning", "param-type-mismatch": "Warning", + /* + 重複定義的區域變數 + */ "redefined-local": "Hint", + /* + 函式呼叫時,傳入了多餘的引數 + */ "redundant-parameter": "Warning", "redundant-return": "Hint", + /* + 賦值操作時,值的數量比被賦值的對象多 + */ "redundant-value": "Warning", "spell-check": "Information", + /* + 後置空格 + */ "trailing-space": "Hint", "unbalanced-assignments": "Warning", "undefined-doc-class": "Warning", "undefined-doc-name": "Warning", "undefined-doc-param": "Warning", + /* + `_ENV` 被設定為了新的字面常數表,但是試圖獲取的全域變數不在這張表中 + */ "undefined-env-child": "Information", "undefined-field": "Warning", + /* + 未定義的全域變數 + */ "undefined-global": "Warning", "unknown-cast-variable": "Warning", "unknown-diag-code": "Warning", + /* + 未使用的函式 + */ "unused-function": "Hint", + /* + 未使用的標籤 + */ "unused-label": "Hint", + /* + 未使用的區域變數 + */ "unused-local": "Hint", + /* + 未使用的不定引數 + */ "unused-vararg": "Hint" } ``` # diagnostics.workspaceDelay -進行工作區診斷的延遲(毫秒)。當你啟動工作區,或編輯了任意檔案後,將會在背景對整個工作區進行重新診斷。設定為負數可以停用工作區診斷。 +進行工作區診斷的延遲(毫秒)。當你啟動工作區,或編輯了任何檔案後,將會在背景對整個工作區進行重新診斷。設定為負數可以停用工作區診斷。 ## type @@ -537,7 +785,7 @@ integer ## default -```json +```jsonc 3000 ``` @@ -553,7 +801,7 @@ integer ## default -```json +```jsonc 100 ``` @@ -571,7 +819,7 @@ Object<string, string> ## default -```json +```jsonc {} ``` @@ -587,7 +835,7 @@ boolean ## default -```json +```jsonc true ``` @@ -609,7 +857,7 @@ string ## default -```json +```jsonc "Auto" ``` @@ -625,7 +873,7 @@ boolean ## default -```json +```jsonc true ``` @@ -641,7 +889,7 @@ boolean ## default -```json +```jsonc false ``` @@ -663,7 +911,7 @@ string ## default -```json +```jsonc "All" ``` @@ -679,7 +927,7 @@ boolean ## default -```json +```jsonc true ``` @@ -695,7 +943,7 @@ boolean ## default -```json +```jsonc false ``` @@ -711,7 +959,7 @@ boolean ## default -```json +```jsonc true ``` @@ -727,7 +975,7 @@ integer ## default -```json +```jsonc 5 ``` @@ -744,7 +992,7 @@ boolean ## default -```json +```jsonc true ``` @@ -760,7 +1008,7 @@ integer ## default -```json +```jsonc 50 ``` @@ -776,7 +1024,7 @@ boolean ## default -```json +```jsonc true ``` @@ -792,7 +1040,7 @@ boolean ## default -```json +```jsonc true ``` @@ -808,7 +1056,7 @@ integer ## default -```json +```jsonc 1000 ``` @@ -824,13 +1072,13 @@ Array<string> ## default -```json +```jsonc [] ``` # runtime.builtin -調整內建庫的啟用狀態,你可以根據實際執行環境停用不存在的庫(或重新定義)。 +調整內建庫的啟用狀態,你可以根據實際執行環境停用(或重新定義)不存在的庫。 * `default`: 表示庫會根據執行版本啟用或停用 * `enable`: 總是啟用 @@ -851,7 +1099,7 @@ object<string, string> ## default -```json +```jsonc { "basic": "default", "bit": "default", @@ -873,7 +1121,7 @@ object<string, string> # runtime.fileEncoding -檔案編碼,`ansi` 選項只在 `Windows` 平台下有效。 +檔案編碼,選項 `ansi` 只在 `Windows` 平台下有效。 ## type @@ -890,7 +1138,7 @@ string ## default -```json +```jsonc "utf8" ``` @@ -906,7 +1154,7 @@ string ## default -```json +```jsonc "${version} ${language} ${encoding}" ``` @@ -937,7 +1185,7 @@ Array<string> ## default -```json +```jsonc [] ``` @@ -957,7 +1205,7 @@ Array<string> ## default -```json +```jsonc ["?.lua","?/init.lua"] ``` @@ -973,7 +1221,7 @@ boolean ## default -```json +```jsonc false ``` @@ -989,13 +1237,13 @@ string ## default -```json +```jsonc "" ``` # runtime.special -將自訂全域變數視為一些特殊的內建變數,語言服務將提供特殊的支援。 +將自訂全域變數視為一些特殊的內建變數,語言伺服將提供特殊的支援。 下面這個例子表示將 `include` 視為 `require` 。 ```json "Lua.runtime.special" : { @@ -1012,7 +1260,7 @@ Object<string, string> ## default -```json +```jsonc {} ``` @@ -1028,7 +1276,7 @@ boolean ## default -```json +```jsonc false ``` @@ -1052,7 +1300,7 @@ string ## default -```json +```jsonc "Lua 5.4" ``` @@ -1068,7 +1316,7 @@ boolean ## default -```json +```jsonc true ``` @@ -1084,7 +1332,7 @@ boolean ## default -```json +```jsonc true ``` @@ -1100,7 +1348,7 @@ boolean ## default -```json +```jsonc false ``` @@ -1116,7 +1364,7 @@ boolean ## default -```json +```jsonc true ``` @@ -1132,7 +1380,7 @@ boolean ## default -```json +```jsonc true ``` @@ -1148,7 +1396,7 @@ Array<string> ## default -```json +```jsonc [] ``` @@ -1165,7 +1413,7 @@ boolean | null ## default -```json +```jsonc null ``` @@ -1181,7 +1429,7 @@ boolean ## default -```json +```jsonc true ``` @@ -1197,7 +1445,7 @@ boolean ## default -```json +```jsonc true ``` @@ -1221,7 +1469,7 @@ boolean ## default -```json +```jsonc true ``` @@ -1237,7 +1485,7 @@ Array<string> ## default -```json +```jsonc [".vscode"] ``` @@ -1253,7 +1501,7 @@ boolean ## default -```json +```jsonc true ``` @@ -1269,7 +1517,7 @@ Array<string> ## default -```json +```jsonc [] ``` @@ -1285,7 +1533,7 @@ integer ## default -```json +```jsonc 5000 ``` @@ -1301,7 +1549,7 @@ integer ## default -```json +```jsonc 500 ``` @@ -1317,7 +1565,7 @@ Array<string> ## default -```json +```jsonc ["file","untitled","git"] ``` @@ -1333,7 +1581,7 @@ boolean ## default -```json +```jsonc true ``` @@ -1349,6 +1597,6 @@ Array<string> ## default -```json +```jsonc [] ```
\ No newline at end of file |