diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e916b978fca9de1d111457fbf30206566edcee93..d6dd8c434480798d4daf46cef392fe00d7ec769b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,7 +28,6 @@ jobs: - { os: ubuntu-20.04, target: linux, platform: linux-arm64, container: 'ubuntu:18.04' } - { os: macos-11, target: darwin, platform: darwin-x64 } - { os: macos-11, target: darwin, platform: darwin-arm64 } - - { os: windows-latest, target: windows, platform: win32-ia32 } - { os: windows-latest, target: windows, platform: win32-x64 } runs-on: ${{ matrix.os }} container: @@ -38,15 +37,15 @@ jobs: if: ${{ matrix.target == 'linux' }} run: | apt-get update - apt-get install -y software-properties-common curl sudo + apt-get install -y software-properties-common add-apt-repository -y ppa:ubuntu-toolchain-r/test # For gcc-9 and g++-9 add-apt-repository -y ppa:git-core/ppa # For git>=2.18. + apt-get update + apt-get install -y sudo git gcc-9 g++-9 + + apt-get install -y curl curl -sL https://deb.nodesource.com/setup_14.x -o /tmp/nodesource_setup.sh # For nodejs sudo bash /tmp/nodesource_setup.sh - apt-get update - apt-get install -y git gcc-9 g++-9 - update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 - update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100 cd ~ curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh sudo bash /tmp/nodesource_setup.sh @@ -55,8 +54,14 @@ jobs: - name: Install aarch64-linux-gnu if: ${{ matrix.platform == 'linux-arm64' }} run: | - sudo apt-get update - sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + apt-get update + apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu + + - name: Prepare container + if: ${{ matrix.target == 'linux' }} + run: | + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 100 - uses: actions/checkout@v3 with: diff --git a/.vscode/launch.json b/.vscode/launch.json index acf5cae637cf5245489b3f56211c89aafae9ca7a..6455aed1354ddf57f53f715c3d2d6f44f832f8fa 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -10,7 +10,6 @@ "program": "${workspaceRoot}/publish.lua", "arg": [ ], - "consoleCoding": "utf8", "sourceCoding": "utf8", "luaexe": "${workspaceFolder}/server/bin/lua-language-server.exe", "outputCapture": [ @@ -27,7 +26,6 @@ "arg": [ ], "luaexe": "${workspaceFolder}/server/bin/lua-language-server.exe", - "consoleCoding": "utf8", "sourceCoding": "utf8", "outputCapture": [ "print", diff --git a/.vscode/settings.json b/.vscode/settings.json index d61164189a708c7e5243a86df2ef7d51e50268c9..d58da9885d785c53189693348e8bf7d08c3cd401 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,6 @@ "Lua.runtime.version": "Lua 5.4", "Lua.workspace.library": { "server/script-beta": true - } + }, + "Lua.workspace.checkThirdParty": false } diff --git a/README.md b/README.md index db6c8d30369e8368134331f117b069bae0b9b702..aa40ab379f1cd76c1ddfb3511ea9490f65dbd0c1 100644 --- a/README.md +++ b/README.md @@ -1,61 +1,53 @@ # lua-language-server -[](https://github.com/LuaLS/lua-language-server/actions/workflows/build.yml) -[](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) - - + + + + ***Lua development just got a whole lot better*** 🧠 -The Lua language server provides various language features for Lua to make development easier and faster. With around half a million installs on Visual Studio Code, it is the most popular extension for Lua language support. +The Lua language server provides various language features for Lua to make development easier and faster. With nearly a million installs in Visual Studio Code, it is the most popular extension for Lua language support. + +[See our website for more info](https://luals.github.io). ## Features -- 📄 Over 20 supported [annotations](https://github.com/LuaLS/lua-language-server/wiki/Annotations) for documenting your code +- ⚙️ Supports `Lua 5.4`, `Lua 5.3`, `Lua 5.2`, `Lua 5.1`, and `LuaJIT` +- 📄 Over 20 supported [annotations](https://luals.github.io/wiki/annotations/) for documenting your code - ↪ Go to definition -- 🦺 Dynamic [type checking](https://github.com/LuaLS/lua-language-server/wiki/Type-Checking) +- 🦺 Dynamic [type checking](https://luals.github.io/wiki/type-checking/) - 🔍 Find references -- ⚠️ [Diagnostics/Warnings](https://github.com/LuaLS/lua-language-server/wiki/Diagnostics) -- 🕵️ [Syntax checking](https://github.com/LuaLS/lua-language-server/wiki/Syntax-Errors) +- ⚠️ [Diagnostics/Warnings](https://luals.github.io/wiki/diagnostics/) +- 🕵️ [Syntax checking](https://luals.github.io/wiki/syntax-errors/) - 📝 Element renaming - 🗨️ Hover to view details on variables, functions, and more - 🖊️ Autocompletion -- 📚 Support for [libraries](https://github.com/LuaLS/lua-language-server/wiki/Libraries) -- 💅 [Code formatting](https://github.com/LuaLS/lua-language-server/wiki/Formatter) -- 💬 [Spell checking](https://github.com/LuaLS/lua-language-server/wiki/Formatter) -- 🛠️ Custom [plugins](https://github.com/LuaLS/lua-language-server/wiki/Plugins) -- 📖 [Documentation Generation](https://github.com/LuaLS/lua-language-server/wiki/Export-Documentation) +- 📚 Support for [libraries](https://luals.github.io/wiki/settings/#workspacelibrary) +- 💅 [Code formatting](https://luals.github.io/wiki/formatter/) +- 💬 [Spell checking](https://luals.github.io/wiki/diagnostics/#spell-check) +- 🛠️ Custom [plugins](https://luals.github.io/wiki/plugins/) +- 📖 [Documentation Generation](https://luals.github.io/wiki/export-docs/) ## Install +The language server can be installed for use in Visual Studio Code, NeoVim, and any [other clients](https://microsoft.github.io/language-server-protocol/implementors/tools/) that support the [Language Server Protocol](https://microsoft.github.io/language-server-protocol/). -The language server can easily be installed for use in VS Code, but it can also be used by other clients using the command line. - -### Visual Studio Code -[](https://marketplace.visualstudio.com/items?itemName=sumneko.lua) - -The language server and Visual Studio Code client can be installed from [the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sumneko.lua). +See [installation instructions on our website](https://luals.github.io/#install). - +[](https://luals.github.io/#vscode-install) +[](https://luals.github.io/#neovim-install) +[](https://luals.github.io/#other-install) -### Command Line -[](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#command-line) +### Community Install Methods +The install methods below are maintained by community members. -Check the [wiki for a guide](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#command-line) to install the language server for use on the command line. This allows the language server to be used with NeoVim and [other clients](https://microsoft.github.io/language-server-protocol/implementors/tools/) that follow the [language server protocol](https://microsoft.github.io/language-server-protocol/overviews/lsp/overview/). - -## Supported Lua Versions -| Version | Supported | -| :-----: | :------------: | -| Lua 5.1 | ![✅][checkmark] | -| Lua 5.2 | ![✅][checkmark] | -| Lua 5.3 | ![✅][checkmark] | -| Lua 5.4 | ![✅][checkmark] | -| LuaJIT | ![✅][checkmark] | +[asdf plugin](https://github.com/bellini666/asdf-lua-language-server) ## Links - [Changelog](https://github.com/LuaLS/lua-language-server/blob/master/changelog.md) -- [Wiki](https://github.com/LuaLS/lua-language-server/wiki) -- [FAQ](https://github.com/LuaLS/lua-language-server/wiki/FAQ) +- [Wiki](https://luals.github.io/wiki) +- [FAQ](https://luals.github.io/wiki/faq) - [Report an issue][issues] - [Suggest a feature][issues] - [Discuss](https://github.com/LuaLS/lua-language-server/discussions) @@ -78,22 +70,13 @@ Check the [wiki for a guide](https://github.com/LuaLS/lua-language-server/wiki/G > **Note** > All translations are provided and collaborated on by the community. If you find an inappropriate or harmful translation, [please report it immediately](https://github.com/LuaLS/lua-language-server/issues). -Are you able to [provide a translation](https://github.com/LuaLS/lua-language-server/wiki/Translations)? It would be greatly appreciated! +Are you able to [provide a translation](https://luals.github.io/wiki/translations)? It would be greatly appreciated! Thank you to [all contributors of translations](https://github.com/LuaLS/lua-language-server/commits/master/locale)! -## Configuration -Configuration of the server can be done in a number of ways, which are explained more in-depth in the [wiki](https://github.com/LuaLS/lua-language-server/wiki/Configuration-File). - -### Visual Studio Code -You can use the [settings editor](https://code.visualstudio.com/docs/getstarted/settings#_settings-editor) or edit the [raw JSON file](https://code.visualstudio.com/docs/getstarted/settings#_settingsjson). - -### Other -See the [configuration file wiki page](https://github.com/LuaLS/lua-language-server/wiki/Configuration-File). - ## Privacy -The language server had **opt-in** telemetry that collected usage data and sent it to the development team to help improve the extension. Read our [privacy policy](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy) to learn more. Telemetry was removed in `v3.6.5` and is no longer part of the language server. +The language server had **opt-in** telemetry that collected usage data and sent it to the development team to help improve the extension. Read our [privacy policy](https://luals.github.io/privacy#language-server) to learn more. Telemetry was removed in `v3.6.5` and is no longer part of the language server. ## Contributors @@ -116,6 +99,3 @@ Software that the language server (or the development of it) uses: * [json.lua](https://github.com/actboy168/json.lua) * [EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle) * [inspect.lua](https://github.com/kikito/inspect.lua) - - -[checkmark]: https://user-images.githubusercontent.com/61925890/183228083-d3aa4eca-30c7-4b9f-aaab-26ce3d8a14fb.png diff --git a/build-settings.lua b/build-settings.lua index 24249e438df863895cd849a1baf1cc41fc338e33..a2cfc42614e2feebec8917a3c66bdf367bd7e861 100644 --- a/build-settings.lua +++ b/build-settings.lua @@ -85,12 +85,10 @@ for dirPath in fs.pairs(fs.path 'server/locale') do type = 'object', properties = copyWithNLS(configuration, function (str) return str:gsub('^%%(.+)%%$', function (key) - if nls[key] then - return nls[key] - else - nls[key] = '' - return '' + if not nls[key] then + nls[key] = "TODO: Needs documentation" end + return nls[key] end) end), } diff --git a/changelog.md b/changelog.md index 5009ced8f0c60eb9f5851f5b6e3c57f389913f52..bd0fe839d312fd04af2fc66a6418085822205041 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,145 @@ # 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. + +## 3.7.2 +`2023-11-9` +* `FIX` [#2407] + +[#2407]: https://github.com/LuaLS/lua-language-server/issues/2407 + +## 3.7.1 +`2023-11-7` +* `FIX` [#2299] +* `FIX` [#2335] + +[#2299]: https://github.com/LuaLS/lua-language-server/issues/2299 +[#2335]: https://github.com/LuaLS/lua-language-server/issues/2335 + +## 3.7.0 +`2023-8-24` +* `NEW` support `---@type` and `--[[@as]]` for return statement +* `NEW` commandline parameter `--force-accept-workspace`: allowing the use of the root directory or home directory as the workspace +* `NEW` diagnostic: `inject-field` +* `NEW` `---@enum` supports attribute `key` + ```lua + ---@enum (key) AnimalType + local enum = { + Cat = 1, + Dog = 2, + } + + ---@param animal userdata + ---@param atp AnimalType + ---@return boolean + local function isAnimalType(animal, atp) + return API.isAnimalType(animal, enum[atp]) + end + + assert(isAnimalType(animal, 'Cat')) + ``` +* `NEW` `---@class` supports attribute `exact` + ```lua + ---@class (exact) Point + ---@field x number + ---@field y number + local m = {} + m.x = 1 -- OK + m.y = 2 -- OK + m.z = 3 -- Warning + ``` + +* `FIX` wrong hover and signature for method with varargs and overloads +* `FIX` [#2155] +* `FIX` [#2224] +* `FIX` [#2252] +* `FIX` [#2267] + +[#2155]: https://github.com/LuaLS/lua-language-server/issues/2155 +[#2224]: https://github.com/LuaLS/lua-language-server/issues/2224 +[#2252]: https://github.com/LuaLS/lua-language-server/issues/2252 +[#2267]: https://github.com/LuaLS/lua-language-server/issues/2267 + +## 3.6.25 +`2023-7-26` +* `FIX` [#2214] + +[#2214]: https://github.com/LuaLS/lua-language-server/issues/2214 + +## 3.6.24 +`2023-7-21` +* `NEW` diagnostic: `missing-fields` +* `FIX` shake of `codeLens` +* `FIX` [#2145] + +[#2145]: https://github.com/LuaLS/lua-language-server/issues/2145 + +## 3.6.23 +`2023-7-7` +* `CHG` signature: narrow by inputed literal + +## 3.6.22 +`2023-6-14` +* `FIX` [#2038] +* `FIX` [#2042] +* `FIX` [#2062] +* `FIX` [#2083] +* `FIX` [#2088] +* `FIX` [#2110] +* `FIX` [#2129] + +[#2038]: https://github.com/LuaLS/lua-language-server/issues/2038 +[#2042]: https://github.com/LuaLS/lua-language-server/issues/2042 +[#2062]: https://github.com/LuaLS/lua-language-server/issues/2062 +[#2083]: https://github.com/LuaLS/lua-language-server/issues/2083 +[#2088]: https://github.com/LuaLS/lua-language-server/issues/2088 +[#2110]: https://github.com/LuaLS/lua-language-server/issues/2110 +[#2129]: https://github.com/LuaLS/lua-language-server/issues/2129 + +## 3.6.21 +`2023-5-24` +* `FIX` disable ffi plugin + +## 3.6.20 +`2023-5-23` +* `NEW` support connecting by socket with `--socket=PORT` +* `FIX` [#2113] + +[#2113]: https://github.com/LuaLS/lua-language-server/issues/2113 + +## 3.6.19 +`2023-4-26` +* `FIX` commandline parameter `checklevel` may not work +* `FIX` [#2036] +* `FIX` [#2037] +* `FIX` [#2056] +* `FIX` [#2077] +* `FIX` [#2081] + +[#2036]: https://github.com/LuaLS/lua-language-server/issues/2036 +[#2037]: https://github.com/LuaLS/lua-language-server/issues/2037 +[#2056]: https://github.com/LuaLS/lua-language-server/issues/2056 +[#2077]: https://github.com/LuaLS/lua-language-server/issues/2077 +[#2081]: https://github.com/LuaLS/lua-language-server/issues/2081 + +## 3.6.18 +`2023-3-23` +* `FIX` [#1943] +* `FIX` [#1996] +* `FIX` [#2004] +* `FIX` [#2013] + +[#1943]: https://github.com/LuaLS/lua-language-server/issues/1943 +[#1996]: https://github.com/LuaLS/lua-language-server/issues/1996 +[#2004]: https://github.com/LuaLS/lua-language-server/issues/2004 +[#2013]: https://github.com/LuaLS/lua-language-server/issues/2013 + ## 3.6.17 `2023-3-9` * `CHG` export documents: export global variables @@ -796,7 +936,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`. ## 2.6.7 `2022-3-9` -* `NEW` offline diagnostic, [read more](https://github.com/LuaLS/lua-language-server/wiki/Offline-Diagnostic) +* `NEW` diagnosis report, [read more](https://luals.github.io/wiki/diagnosis-report/) * `CHG` `VSCode`: 1.65 has built in new `Lua` syntax files, so this extension no longer provides syntax files, which means you can install other syntax extensions in the marketplace. If you have any suggestions or issues, please [open issues here](https://github.com/LuaLS/lua.tmbundle). * `CHG` telemetry: the prompt will only appear in VSCode to avoid repeated prompts in other platforms due to the inability to automatically modify the settings. * `FIX` [#965](https://github.com/LuaLS/lua-language-server/issues/965) @@ -850,7 +990,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`. ## 2.6.0 `2022-1-13` -* `NEW` supports multi-workspace in server side, for developers of language clients, please [read here](https://github.com/LuaLS/lua-language-server/wiki/Multi-workspace-supports) to learn more. +* `NEW` supports multi-workspace in server side, for developers of language clients, please [read here](https://luals.github.io/wiki/developing/#multiple-workspace-support) to learn more. * `NEW` setting: + `Lua.hint.arrayIndex` + `Lua.semantic.enable` @@ -1217,7 +1357,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`. ## 2.1.0 `2021-7-2` -* `NEW` supports local config file, using `--configpath="config.json"`, [learn more here](https://github.com/LuaLS/lua-language-server/wiki/Setting-without-VSCode) +* `NEW` supports local config file, using `--configpath="config.json"`, [learn more here](https://luals.github.io/wiki/usage/#--configpath) * `NEW` goto `type definition` * `NEW` infer type by callback param: ```lua @@ -1372,7 +1512,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`. ## 1.20.0 `2021-3-27` -* `CHG` telemetry: change to opt-in, see [#462](https://github.com/LuaLS/lua-language-server/issues/462) and [Privacy-Policy](https://github.com/LuaLS/lua-language-server/wiki/Privacy-Policy) +* `CHG` telemetry: change to opt-in, see [#462](https://github.com/LuaLS/lua-language-server/issues/462) and [Privacy-Policy](https://luals.github.io/privacy/#language-server) * `FIX` [#467](https://github.com/LuaLS/lua-language-server/issues/467) ## 1.19.1 diff --git a/client/package-lock.json b/client/package-lock.json index c6220b6bc7ee72b97f360bdc424a1212325b1eab..88a00c5830dc8197f276c2b9d6671bce1c537714 100644 --- a/client/package-lock.json +++ b/client/package-lock.json @@ -1,7 +1,7 @@ { "name": "lsp-sample-client", "version": "0.0.1", - "lockfileVersion": 2, + "lockfileVersion": 3, "requires": true, "packages": { "": { @@ -13,7 +13,7 @@ "dayjs": "^1.11.7", "simple-git": "^3.16.0", "triple-beam": "^1.3.0", - "vscode-languageclient": "8.0.2", + "vscode-languageclient": "8.1.0", "winston": "^3.8.2" }, "devDependencies": { @@ -25,9 +25,9 @@ } }, "node_modules/@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.6.0.tgz", + "integrity": "sha512-Ir+AOibqzrIsL6ajt3Rz3LskB7OiMVHqltZmspbW/TJuTVuyOMirVqAkjfY6JISiLHgyNqicAC8AyHHGzNd/dA==", "engines": { "node": ">=0.1.90" } @@ -57,20 +57,25 @@ }, "node_modules/@types/node": { "version": "17.0.45", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-17.0.45.tgz", + "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.45.tgz", "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", "dev": true }, + "node_modules/@types/triple-beam": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/@types/triple-beam/-/triple-beam-1.3.5.tgz", + "integrity": "sha512-6WaYesThRMCl19iryMYP7/x2OVgCtbIVflDGFpWnb9irXI3UjYE4AzmYuiUKY1AJstGijoY+MgUszMgRxIYTYw==" + }, "node_modules/@types/vscode": { - "version": "1.76.0", - "resolved": "https://registry.npmmirror.com/@types/vscode/-/vscode-1.76.0.tgz", - "integrity": "sha512-CQcY3+Fe5hNewHnOEAVYj4dd1do/QHliXaknAEYSXx2KEHUzFibDZSKptCon+HPgK55xx20pR+PBJjf0MomnBA==", + "version": "1.84.1", + "resolved": "https://registry.npmjs.org/@types/vscode/-/vscode-1.84.1.tgz", + "integrity": "sha512-DB10vBRLEPA/us7p3gQilU2Tq5HDu6JWTyCpD9qtb7MKWIvJS5In9HU3YgVGCXf/miwHJiY62aXwjtUSMpT8HA==", "dev": true }, "node_modules/async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" + "version": "3.2.5", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.5.tgz", + "integrity": "sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==" }, "node_modules/asynckit": { "version": "0.4.0", @@ -78,9 +83,9 @@ "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" }, "node_modules/axios": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.6.tgz", - "integrity": "sha512-rC/7F08XxZwjMV4iuWv+JpD3E0Ksqg9nac4IIg6RwNuF0JTeWoCo/mBNG54+tNhhI11G3/VDRbdDQTs9hGp4pQ==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.6.1.tgz", + "integrity": "sha512-vfBmhDpKafglh0EldBEbVuoe7DyAavGSLWhuSm5ZSEKQnHhBf0xAAwybbNH1IkrJNGnS/VG4I5yxig1pCEXE4g==", "dependencies": { "follow-redirects": "^1.15.0", "form-data": "^4.0.0", @@ -89,16 +94,15 @@ }, "node_modules/balanced-match": { "version": "1.0.2", - "resolved": "https://registry.nlark.com/balanced-match/download/balanced-match-1.0.2.tgz", - "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=" + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.nlark.com/brace-expansion/download/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" } }, "node_modules/color": { @@ -152,15 +156,10 @@ "node": ">= 0.8" } }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, "node_modules/dayjs": { - "version": "1.11.7", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz", - "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==" + "version": "1.11.10", + "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.10.tgz", + "integrity": "sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==" }, "node_modules/debug": { "version": "4.3.4", @@ -178,11 +177,6 @@ } } }, - "node_modules/debug/node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, "node_modules/delayed-stream": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", @@ -207,9 +201,9 @@ "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" }, "node_modules/follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==", + "version": "1.15.3", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.3.tgz", + "integrity": "sha512-1VzOtuEM8pC9SFU1E+8KfTjZyMztRsgEfwQl44z8A25uy13jSzTj6dyK2Df52iV0vgHCfBwLhDWevLn95w5v6Q==", "funding": [ { "type": "individual", @@ -265,21 +259,25 @@ "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" }, "node_modules/logform": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.2.tgz", - "integrity": "sha512-W4c9himeAwXEdZ05dQNerhFz2XG80P9Oj0loPUMV23VC2it0orMHQhJm4hdnnor3rd1HsGf6a2lPwBM1zeXHGw==", + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/logform/-/logform-2.6.0.tgz", + "integrity": "sha512-1ulHeNPp6k/LD8H91o7VYFBng5i1BDE7HoKxVbZiGFidS1Rj65qcywLxX+pVfAPoQJEjRdvKcusKwOupHCVOVQ==", "dependencies": { - "@colors/colors": "1.5.0", + "@colors/colors": "1.6.0", + "@types/triple-beam": "^1.3.2", "fecha": "^4.2.0", "ms": "^2.1.1", "safe-stable-stringify": "^2.3.1", "triple-beam": "^1.3.0" + }, + "engines": { + "node": ">= 12.0.0" } }, "node_modules/lru-cache": { "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", "dependencies": { "yallist": "^4.0.0" }, @@ -307,20 +305,20 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=10" } }, "node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" }, "node_modules/one-time": { "version": "1.0.0", @@ -336,9 +334,9 @@ "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" }, "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", "dependencies": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -368,17 +366,17 @@ ] }, "node_modules/safe-stable-stringify": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.2.tgz", - "integrity": "sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA==", + "version": "2.4.3", + "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz", + "integrity": "sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==", "engines": { "node": ">=10" } }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dependencies": { "lru-cache": "^6.0.0" }, @@ -390,9 +388,9 @@ } }, "node_modules/simple-git": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.16.0.tgz", - "integrity": "sha512-zuWYsOLEhbJRWVxpjdiXl6eyAyGo/KzVW+KFhhw9MqEEJttcq+32jTWSGyxTdf9e/YCohxRE+9xpWFj9FdiJNw==", + "version": "3.20.0", + "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.20.0.tgz", + "integrity": "sha512-ozK8tl2hvLts8ijTs18iFruE+RoqmC/mqZhjs/+V7gS5W68JpJ3+FCTmLVqmR59MaUQ52MfGQuWsIqfsTbbJ0Q==", "dependencies": { "@kwsites/file-exists": "^1.1.1", "@kwsites/promise-deferred": "^1.1.1", @@ -433,9 +431,12 @@ "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" }, "node_modules/triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.4.1.tgz", + "integrity": "sha512-aZbgViZrg1QNcG+LULa7nhZpJTZSLm/mXnHXnbAbjmN5aSa0y7V+wvv6+4WaBtpISJzThKy+PIPxc1Nq1EJ9mg==", + "engines": { + "node": ">= 14.0.0" + } }, "node_modules/util-deprecate": { "version": "1.0.2", @@ -443,46 +444,46 @@ "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" }, "node_modules/vscode-jsonrpc": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz", - "integrity": "sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz", + "integrity": "sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==", "engines": { "node": ">=14.0.0" } }, "node_modules/vscode-languageclient": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-8.0.2.tgz", - "integrity": "sha512-lHlthJtphG9gibGb/y72CKqQUxwPsMXijJVpHEC2bvbFqxmkj9LwQ3aGU9dwjBLqsX1S4KjShYppLvg1UJDF/Q==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-8.1.0.tgz", + "integrity": "sha512-GL4QdbYUF/XxQlAsvYWZRV3V34kOkpRlvV60/72ghHfsYFnS/v2MANZ9P6sHmxFcZKOse8O+L9G7Czg0NUWing==", "dependencies": { - "minimatch": "^3.0.4", - "semver": "^7.3.5", - "vscode-languageserver-protocol": "3.17.2" + "minimatch": "^5.1.0", + "semver": "^7.3.7", + "vscode-languageserver-protocol": "3.17.3" }, "engines": { "vscode": "^1.67.0" } }, "node_modules/vscode-languageserver-protocol": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz", - "integrity": "sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==", + "version": "3.17.3", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz", + "integrity": "sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==", "dependencies": { - "vscode-jsonrpc": "8.0.2", - "vscode-languageserver-types": "3.17.2" + "vscode-jsonrpc": "8.1.0", + "vscode-languageserver-types": "3.17.3" } }, "node_modules/vscode-languageserver-types": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz", - "integrity": "sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==" + "version": "3.17.3", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", + "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" }, "node_modules/winston": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.8.2.tgz", - "integrity": "sha512-MsE1gRx1m5jdTTO9Ld/vND4krP2To+lgDoMEHGGa4HIlAUyXJtfc7CxQcGXVyz2IBpw5hbFkj2b/AtUdQwyRew==", + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/winston/-/winston-3.11.0.tgz", + "integrity": "sha512-L3yR6/MzZAOl0DsysUXHVjOwv8mKZ71TrA/41EIduGpOOV5LQVodqN+QdQ6BS6PJ/RdIshZhq84P/fStEZkk7g==", "dependencies": { - "@colors/colors": "1.5.0", + "@colors/colors": "^1.6.0", "@dabh/diagnostics": "^2.0.2", "async": "^3.2.3", "is-stream": "^2.0.0", @@ -499,421 +500,22 @@ } }, "node_modules/winston-transport": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.5.0.tgz", - "integrity": "sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.6.0.tgz", + "integrity": "sha512-wbBA9PbPAHxKiygo7ub7BYRiKxms0tpfU2ljtWzb3SjRjv5yl6Ozuy/TkXf00HTAt+Uylo3gSkNwzc4ME0wiIg==", "dependencies": { "logform": "^2.3.2", "readable-stream": "^3.6.0", "triple-beam": "^1.3.0" }, "engines": { - "node": ">= 6.4.0" + "node": ">= 12.0.0" } }, "node_modules/yallist": { "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" - } - }, - "dependencies": { - "@colors/colors": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", - "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==" - }, - "@dabh/diagnostics": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@dabh/diagnostics/-/diagnostics-2.0.3.tgz", - "integrity": "sha512-hrlQOIi7hAfzsMqlGSFyVucrx38O+j6wiGOf//H2ecvIEqYN4ADBSS2iLMh5UFyDunCNniUIPk/q3riFv45xRA==", - "requires": { - "colorspace": "1.1.x", - "enabled": "2.0.x", - "kuler": "^2.0.0" - } - }, - "@kwsites/file-exists": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@kwsites/file-exists/-/file-exists-1.1.1.tgz", - "integrity": "sha512-m9/5YGR18lIwxSFDwfE3oA7bWuq9kdau6ugN4H2rJeyhFQZcG9AgSHkQtSD15a8WvTgfz9aikZMrKPHvbpqFiw==", - "requires": { - "debug": "^4.1.1" - } - }, - "@kwsites/promise-deferred": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/@kwsites/promise-deferred/-/promise-deferred-1.1.1.tgz", - "integrity": "sha512-GaHYm+c0O9MjZRu0ongGBRbinu8gVAMd2UZjji6jVmqKtZluZnptXGWhz1E8j8D2HJ3f/yMxKAUC0b+57wncIw==" - }, - "@types/node": { - "version": "17.0.45", - "resolved": "https://registry.npmmirror.com/@types/node/-/node-17.0.45.tgz", - "integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw==", - "dev": true - }, - "@types/vscode": { - "version": "1.76.0", - "resolved": "https://registry.npmmirror.com/@types/vscode/-/vscode-1.76.0.tgz", - "integrity": "sha512-CQcY3+Fe5hNewHnOEAVYj4dd1do/QHliXaknAEYSXx2KEHUzFibDZSKptCon+HPgK55xx20pR+PBJjf0MomnBA==", - "dev": true - }, - "async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==" - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==" - }, - "axios": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.2.6.tgz", - "integrity": "sha512-rC/7F08XxZwjMV4iuWv+JpD3E0Ksqg9nac4IIg6RwNuF0JTeWoCo/mBNG54+tNhhI11G3/VDRbdDQTs9hGp4pQ==", - "requires": { - "follow-redirects": "^1.15.0", - "form-data": "^4.0.0", - "proxy-from-env": "^1.1.0" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.nlark.com/balanced-match/download/balanced-match-1.0.2.tgz", - "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=" - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.nlark.com/brace-expansion/download/brace-expansion-1.1.11.tgz", - "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "color": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz", - "integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==", - "requires": { - "color-convert": "^1.9.3", - "color-string": "^1.6.0" - } - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" - }, - "color-string": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", - "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", - "requires": { - "color-name": "^1.0.0", - "simple-swizzle": "^0.2.2" - } - }, - "colorspace": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/colorspace/-/colorspace-1.1.4.tgz", - "integrity": "sha512-BgvKJiuVu1igBUF2kEjRCZXol6wiiGbY5ipL/oVPwm0BL9sIpMIzM8IK7vwuxIIzOXMV3Ey5w+vxhm0rR/TN8w==", - "requires": { - "color": "^3.1.3", - "text-hex": "1.0.x" - } - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "dayjs": { - "version": "1.11.7", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.7.tgz", - "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==" - }, - "debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - } - } - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==" - }, - "enabled": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/enabled/-/enabled-2.0.0.tgz", - "integrity": "sha512-AKrN98kuwOzMIdAizXGI86UFBoo26CL21UM763y1h/GMSJ4/OHU9k2YlsmBpyScFo/wbLzWQJBMCW4+IO3/+OQ==" - }, - "fecha": { - "version": "4.2.3", - "resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.3.tgz", - "integrity": "sha512-OP2IUU6HeYKJi3i0z4A19kHMQoLVs4Hc+DPqqxI2h/DPZHTm/vjsfC6P0b4jCMy14XizLBqvndQ+UilD7707Jw==" - }, - "fn.name": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fn.name/-/fn.name-1.1.0.tgz", - "integrity": "sha512-GRnmB5gPyJpAhTQdSZTSp9uaPSvl09KoYcMQtsB9rQoOmzs9dH6ffeccH+Z+cv6P68Hu5bC6JjRh4Ah/mHSNRw==" - }, - "follow-redirects": { - "version": "1.15.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.2.tgz", - "integrity": "sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==" - }, - "form-data": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", - "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.8", - "mime-types": "^2.1.12" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "is-arrayish": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", - "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" - }, - "is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==" - }, - "kuler": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/kuler/-/kuler-2.0.0.tgz", - "integrity": "sha512-Xq9nH7KlWZmXAtodXDDRE7vs6DU1gTU8zYDHDiWLSip45Egwq3plLHzPn27NgvzL2r1LMPC1vdqh98sQxtqj4A==" - }, - "logform": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/logform/-/logform-2.4.2.tgz", - "integrity": "sha512-W4c9himeAwXEdZ05dQNerhFz2XG80P9Oj0loPUMV23VC2it0orMHQhJm4hdnnor3rd1HsGf6a2lPwBM1zeXHGw==", - "requires": { - "@colors/colors": "1.5.0", - "fecha": "^4.2.0", - "ms": "^2.1.1", - "safe-stable-stringify": "^2.3.1", - "triple-beam": "^1.3.0" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npm.taobao.org/lru-cache/download/lru-cache-6.0.0.tgz", - "integrity": "sha1-bW/mVw69lqr5D8rR2vo7JWbbOpQ=", - "requires": { - "yallist": "^4.0.0" - } - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==" - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "requires": { - "mime-db": "1.52.0" - } - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==" - }, - "one-time": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/one-time/-/one-time-1.0.0.tgz", - "integrity": "sha512-5DXOiRKwuSEcQ/l0kGCF6Q3jcADFv5tSmRaJck/OqkVFcOzutB134KRSfF0xDrL39MNnqxbHBbUUcjZIhTgb2g==", - "requires": { - "fn.name": "1.x.x" - } - }, - "proxy-from-env": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", - "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==" - }, - "safe-stable-stringify": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.2.tgz", - "integrity": "sha512-gMxvPJYhP0O9n2pvcfYfIuYgbledAOJFcqRThtPRmjscaipiwcwPPKLytpVzMkG2HAN87Qmo2d4PtGiri1dSLA==" - }, - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "requires": { - "lru-cache": "^6.0.0" - } - }, - "simple-git": { - "version": "3.16.0", - "resolved": "https://registry.npmjs.org/simple-git/-/simple-git-3.16.0.tgz", - "integrity": "sha512-zuWYsOLEhbJRWVxpjdiXl6eyAyGo/KzVW+KFhhw9MqEEJttcq+32jTWSGyxTdf9e/YCohxRE+9xpWFj9FdiJNw==", - "requires": { - "@kwsites/file-exists": "^1.1.1", - "@kwsites/promise-deferred": "^1.1.1", - "debug": "^4.3.4" - } - }, - "simple-swizzle": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", - "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", - "requires": { - "is-arrayish": "^0.3.1" - } - }, - "stack-trace": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", - "integrity": "sha512-KGzahc7puUKkzyMt+IqAep+TVNbKP+k2Lmwhub39m1AsTSkaDutx56aDCo+HLDzf/D26BIHTJWNiTG1KAJiQCg==" - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "text-hex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/text-hex/-/text-hex-1.0.0.tgz", - "integrity": "sha512-uuVGNWzgJ4yhRaNSiubPY7OjISw4sw4E5Uv0wbjp+OzcbmVU/rsT8ujgcXJhn9ypzsgr5vlzpPqP+MBBKcGvbg==" - }, - "triple-beam": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/triple-beam/-/triple-beam-1.3.0.tgz", - "integrity": "sha512-XrHUvV5HpdLmIj4uVMxHggLbFSZYIn7HEWsqePZcI50pco+MPqJ50wMGY794X7AOOhxOBAjbkqfAbEe/QMp2Lw==" - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==" - }, - "vscode-jsonrpc": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz", - "integrity": "sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==" - }, - "vscode-languageclient": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/vscode-languageclient/-/vscode-languageclient-8.0.2.tgz", - "integrity": "sha512-lHlthJtphG9gibGb/y72CKqQUxwPsMXijJVpHEC2bvbFqxmkj9LwQ3aGU9dwjBLqsX1S4KjShYppLvg1UJDF/Q==", - "requires": { - "minimatch": "^3.0.4", - "semver": "^7.3.5", - "vscode-languageserver-protocol": "3.17.2" - } - }, - "vscode-languageserver-protocol": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz", - "integrity": "sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==", - "requires": { - "vscode-jsonrpc": "8.0.2", - "vscode-languageserver-types": "3.17.2" - } - }, - "vscode-languageserver-types": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz", - "integrity": "sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==" - }, - "winston": { - "version": "3.8.2", - "resolved": "https://registry.npmjs.org/winston/-/winston-3.8.2.tgz", - "integrity": "sha512-MsE1gRx1m5jdTTO9Ld/vND4krP2To+lgDoMEHGGa4HIlAUyXJtfc7CxQcGXVyz2IBpw5hbFkj2b/AtUdQwyRew==", - "requires": { - "@colors/colors": "1.5.0", - "@dabh/diagnostics": "^2.0.2", - "async": "^3.2.3", - "is-stream": "^2.0.0", - "logform": "^2.4.0", - "one-time": "^1.0.0", - "readable-stream": "^3.4.0", - "safe-stable-stringify": "^2.3.1", - "stack-trace": "0.0.x", - "triple-beam": "^1.3.0", - "winston-transport": "^4.5.0" - } - }, - "winston-transport": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/winston-transport/-/winston-transport-4.5.0.tgz", - "integrity": "sha512-YpZzcUzBedhlTAfJg6vJDlyEai/IFMIVcaEZZyl3UXIl4gmqRpU7AE89AHLkbzLUsv0NVmw7ts+iztqKxxPW1Q==", - "requires": { - "logform": "^2.3.2", - "readable-stream": "^3.6.0", - "triple-beam": "^1.3.0" - } - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npm.taobao.org/yallist/download/yallist-4.0.0.tgz", - "integrity": "sha1-m7knkNnA7/7GO+c1GeEaNQGaOnI=" + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" } } } diff --git a/client/package.json b/client/package.json index 871961f5fb6ac2e74c5bba508f43e6bf08473006..8ac6284c64d61c2c1956f65690267dfb30d47155 100644 --- a/client/package.json +++ b/client/package.json @@ -21,7 +21,7 @@ "dayjs": "^1.11.7", "simple-git": "^3.16.0", "triple-beam": "^1.3.0", - "vscode-languageclient": "8.0.2", + "vscode-languageclient": "8.1.0", "winston": "^3.8.2" }, "devDependencies": { diff --git a/client/src/addon_manager/panels/WebVue.ts b/client/src/addon_manager/panels/WebVue.ts index d0b28c031a78cbb50db010cd566c2f775d06efe5..271c1ae638390dfff14439b7690a17ba3ac697ad 100644 --- a/client/src/addon_manager/panels/WebVue.ts +++ b/client/src/addon_manager/panels/WebVue.ts @@ -85,7 +85,7 @@ export class WebVue { } const workspaceOpen = - vscode.workspace.workspaceFolders && + vscode.workspace.workspaceFolders !== undefined && vscode.workspace.workspaceFolders.length > 0; const clientVersion = context.extension.packageJSON.version; diff --git a/client/src/addon_manager/registration.ts b/client/src/addon_manager/registration.ts index 97dc2b4a867962d4e5acc29fb40d1af1f77d5f3b..20ac31d9fbe76664f5537fcd70b80c9488e1afca 100644 --- a/client/src/addon_manager/registration.ts +++ b/client/src/addon_manager/registration.ts @@ -8,6 +8,7 @@ import RelativeTime from "dayjs/plugin/relativeTime"; import { git, setupGit } from "./services/git.service"; import { GIT_DOWNLOAD_URL } from "./config"; import { NotificationLevels } from "./types/webvue"; +import * as languageServer from "../languageserver"; dayjs.extend(RelativeTime); @@ -41,6 +42,13 @@ export async function activate(context: vscode.ExtensionContext) { logger.add(fileLogger); await fileLogger.logStart(); } + // Start language server if it is not already + // We depend on it to apply config modifications + if (!languageServer.defaultClient) { + logger.debug("Starting language server"); + await languageServer.createClient(context); + logger.debug("Language server has started"); + } // Check if git is installed if (!(await git.version()).installed) { diff --git a/client/src/extension.ts b/client/src/extension.ts index 0ca460e8ae1a6256a7e82ef9ec9403ba95627a02..1f4f3b9d76f28865359bcb5d7b16d4a2a38474fb 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -18,7 +18,6 @@ export function activate(context: vscode.ExtensionContext) { try { luaDocContext[k] = context[k]; } catch (error) { - console.error(error); } } luaDocContext.ViewType = 'lua-doc'; @@ -41,5 +40,3 @@ export function activate(context: vscode.ExtensionContext) { export function deactivate() { languageserver.deactivate(); } - - diff --git a/client/src/languageserver.ts b/client/src/languageserver.ts index a1fb1ded8d138c746c33ce95410bc444474e5c58..c6342a7fc7d4374286aa26535b9e887ba34fff60 100644 --- a/client/src/languageserver.ts +++ b/client/src/languageserver.ts @@ -18,6 +18,7 @@ import { DocumentSelector, LSPAny, ExecuteCommandRequest, + TransportKind, } from 'vscode-languageclient/node'; export let defaultClient: LuaClient | null; @@ -75,14 +76,28 @@ function registerCustomCommands(context: ExtensionContext) { arguments: [output.toString()], }); })); + + context.subscriptions.push(Commands.registerCommand('lua.reloadFFIMeta', async () => { + defaultClient.client.sendRequest(ExecuteCommandRequest.type, { + command: 'lua.reloadFFIMeta', + }) + })) } -class LuaClient { +/** Creates a new {@link LuaClient} and starts it. */ +export const createClient = (context: ExtensionContext) => { + defaultClient = new LuaClient(context, [{ language: 'lua' }]) + defaultClient.start(); +} +class LuaClient extends Disposable { public client: LanguageClient; private disposables = new Array<Disposable>(); - constructor(private context: ExtensionContext, - private documentSelector: DocumentSelector) { + constructor( + private context: ExtensionContext, + private documentSelector: DocumentSelector + ) { + super(() => this.dispose()); } async start() { @@ -97,23 +112,35 @@ class LuaClient { }, initializationOptions: { changeConfiguration: true, - } + }, }; - const config = Workspace.getConfiguration(undefined, vscode.workspace.workspaceFolders?.[0]); + const config = Workspace.getConfiguration( + undefined, + vscode.workspace.workspaceFolders?.[0] + ); const commandParam = config.get("Lua.misc.parameters"); const command = await this.getCommand(config); - if (!Array.isArray(commandParam)) throw new Error("Lua.misc.parameters must be an Array!"); + if (!Array.isArray(commandParam)) + throw new Error("Lua.misc.parameters must be an Array!"); + + const port = this.getPort(commandParam); const serverOptions: ServerOptions = { command: command, - args: commandParam, + transport: port + ? { + kind: TransportKind.socket, + port: port, + } + : undefined, + args: commandParam, }; this.client = new LanguageClient( - 'Lua', - 'Lua', + "Lua", + "Lua", serverOptions, clientOptions ); @@ -127,7 +154,8 @@ class LuaClient { private async getCommand(config: vscode.WorkspaceConfiguration) { const executablePath = config.get("Lua.misc.executablePath"); - if (typeof executablePath !== "string") throw new Error("Lua.misc.executablePath must be a string!"); + if (typeof executablePath !== "string") + throw new Error("Lua.misc.executablePath must be a string!"); if (executablePath && executablePath !== "") { return executablePath; @@ -137,39 +165,45 @@ class LuaClient { let command: string; let binDir: string | undefined; - if ((await fs.promises.stat(this.context.asAbsolutePath('server/bin'))).isDirectory()) { - binDir = 'bin'; + if ( + ( + await fs.promises.stat( + this.context.asAbsolutePath("server/bin") + ) + ).isDirectory() + ) { + binDir = "bin"; } switch (platform) { case "win32": command = this.context.asAbsolutePath( path.join( - 'server', - binDir ? binDir : 'bin-Windows', - 'lua-language-server.exe' + "server", + binDir ? binDir : "bin-Windows", + "lua-language-server.exe" ) ); break; case "linux": command = this.context.asAbsolutePath( path.join( - 'server', - binDir ? binDir : 'bin-Linux', - 'lua-language-server' + "server", + binDir ? binDir : "bin-Linux", + "lua-language-server" ) ); - await fs.promises.chmod(command, '777'); + await fs.promises.chmod(command, "777"); break; case "darwin": command = this.context.asAbsolutePath( path.join( - 'server', - binDir ? binDir : 'bin-macOS', - 'lua-language-server' + "server", + binDir ? binDir : "bin-macOS", + "lua-language-server" ) ); - await fs.promises.chmod(command, '777'); + await fs.promises.chmod(command, "777"); break; default: throw new Error(`Unsupported operating system "${platform}"!`); @@ -177,6 +211,25 @@ class LuaClient { return command; } + // Generated by Copilot + private getPort(commandParam: string[]): number | undefined { + // "--socket=xxxx" or "--socket xxxx" + const portIndex = commandParam.findIndex((value) => { + return value.startsWith("--socket"); + }); + if (portIndex === -1) { + return undefined; + } + const port = + commandParam[portIndex].split("=")[1] || + commandParam[portIndex].split(" ")[1] || + commandParam[portIndex + 1]; + if (!port) { + return undefined; + } + return Number(port); + } + async stop() { this.client.stop(); for (const disposable of this.disposables) { @@ -187,29 +240,39 @@ class LuaClient { statusBar() { const client = this.client; const bar = window.createStatusBarItem(vscode.StatusBarAlignment.Right); - bar.text = 'Lua'; - bar.command = 'Lua.statusBar'; - this.disposables.push(Commands.registerCommand(bar.command, () => { - client.sendNotification('$/status/click'); - })); - this.disposables.push(client.onNotification('$/status/show', () => { - bar.show(); - })); - this.disposables.push(client.onNotification('$/status/hide', () => { - bar.hide(); - })); - this.disposables.push(client.onNotification('$/status/report', (params) => { - bar.text = params.text; - bar.tooltip = params.tooltip; - })); - client.sendNotification('$/status/refresh'); + bar.text = "Lua"; + bar.command = "Lua.statusBar"; + this.disposables.push( + Commands.registerCommand(bar.command, () => { + client.sendNotification("$/status/click"); + }) + ); + this.disposables.push( + client.onNotification("$/status/show", () => { + bar.show(); + }) + ); + this.disposables.push( + client.onNotification("$/status/hide", () => { + bar.hide(); + }) + ); + this.disposables.push( + client.onNotification("$/status/report", (params) => { + bar.text = params.text; + bar.tooltip = params.tooltip; + }) + ); + client.sendNotification("$/status/refresh"); this.disposables.push(bar); } onCommand() { - this.disposables.push(this.client.onNotification('$/command', (params) => { - Commands.executeCommand(params.command, params.data); - })); + this.disposables.push( + this.client.onNotification("$/command", (params) => { + Commands.executeCommand(params.command, params.data); + }) + ); } } @@ -223,10 +286,7 @@ export function activate(context: ExtensionContext) { // Untitled files go to a default client. if (!defaultClient) { - defaultClient = new LuaClient(context, [ - { language: 'lua' } - ]); - defaultClient.start(); + createClient(context); return; } } diff --git a/client/webvue b/client/webvue index ac8a4db6fbb2e5aab49dca9aa55e367cec92aadd..db19cff499f3be8365250b2b7c6f599e48e421ff 160000 --- a/client/webvue +++ b/client/webvue @@ -1 +1 @@ -Subproject commit ac8a4db6fbb2e5aab49dca9aa55e367cec92aadd +Subproject commit db19cff499f3be8365250b2b7c6f599e48e421ff diff --git a/package-lock.json b/package-lock.json index c3b1752d67de253a219508a7dc0ae8bbeacc7d3a..71b5e363e541b4ebcac47eec2462c3ad1c484a87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "lua", - "version": "3.6.12", + "version": "3.7.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "lua", - "version": "3.6.12", + "version": "3.7.0", "license": "MIT", "engines": { "vscode": "^1.67.0" diff --git a/package.json b/package.json index cbe41797b5a395c81b2cfb50da7fb812701dfe56..d49f85748649f1f1cdbce038815508cf031dada0 100644 --- a/package.json +++ b/package.json @@ -33,6 +33,10 @@ { "command": "lua.exportDocument", "title": "%command.exportDocument%" + }, + { + "command": "lua.reloadFFIMeta", + "title": "%command.reloadFFIMeta%" } ], "configuration": { @@ -177,8 +181,11 @@ "err-nonstandard-symbol", "err-then-as-do", "exp-in-action", + "global-element", "global-in-nil-env", + "incomplete-signature-doc", "index-in-func-name", + "inject-field", "invisible", "jump-local-scope", "keyword", @@ -222,9 +229,13 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", + "missing-global-doc", + "missing-local-export-doc", "missing-parameter", "missing-return", "missing-return-value", + "name-style-check", "need-check-nil", "need-paren", "nesting-long-mark", @@ -337,6 +348,17 @@ ], "type": "string" }, + "conventions": { + "default": "Fallback", + "description": "%config.diagnostics.conventions%", + "enum": [ + "Any", + "Opened", + "None", + "Fallback" + ], + "type": "string" + }, "duplicate": { "default": "Fallback", "description": "%config.diagnostics.duplicate%", @@ -481,6 +503,18 @@ ], "type": "string" }, + "conventions": { + "default": "Fallback", + "description": "%config.diagnostics.conventions%", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Fallback" + ], + "type": "string" + }, "duplicate": { "default": "Fallback", "description": "%config.diagnostics.duplicate%", @@ -907,6 +941,19 @@ ], "type": "string" }, + "global-element": { + "default": "None", + "description": "%config.diagnostics.global-element%", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Any", "description": "%config.diagnostics.global-in-nil-env%", @@ -920,6 +967,32 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "None", + "description": "%config.diagnostics.incomplete-signature-doc%", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "inject-field": { + "default": "Opened", + "description": "%config.diagnostics.inject-field%", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "invisible": { "default": "Any", "description": "%config.diagnostics.invisible%", @@ -946,6 +1019,45 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "%config.diagnostics.missing-fields%", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "None", + "description": "%config.diagnostics.missing-global-doc%", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "missing-local-export-doc": { + "default": "None", + "description": "%config.diagnostics.missing-local-export-doc%", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "missing-parameter": { "default": "Any", "description": "%config.diagnostics.missing-parameter%", @@ -985,6 +1097,19 @@ ], "type": "string" }, + "name-style-check": { + "default": "None", + "description": "%config.diagnostics.name-style-check%", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "need-check-nil": { "default": "Opened", "description": "%config.diagnostics.need-check-nil%", @@ -1671,6 +1796,21 @@ ], "type": "string" }, + "global-element": { + "default": "Warning", + "description": "%config.diagnostics.global-element%", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Warning", "description": "%config.diagnostics.global-in-nil-env%", @@ -1686,6 +1826,36 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "Warning", + "description": "%config.diagnostics.incomplete-signature-doc%", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "inject-field": { + "default": "Warning", + "description": "%config.diagnostics.inject-field%", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "invisible": { "default": "Warning", "description": "%config.diagnostics.invisible%", @@ -1716,6 +1886,51 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "%config.diagnostics.missing-fields%", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "Warning", + "description": "%config.diagnostics.missing-global-doc%", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "missing-local-export-doc": { + "default": "Warning", + "description": "%config.diagnostics.missing-local-export-doc%", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "missing-parameter": { "default": "Warning", "description": "%config.diagnostics.missing-parameter%", @@ -1761,6 +1976,21 @@ ], "type": "string" }, + "name-style-check": { + "default": "Warning", + "description": "%config.diagnostics.name-style-check%", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "need-check-nil": { "default": "Warning", "description": "%config.diagnostics.need-check-nil%", @@ -2414,6 +2644,22 @@ "scope": "resource", "type": "array" }, + "Lua.nameStyle.config": { + "additionalProperties": false, + "default": {}, + "markdownDescription": "%config.nameStyle.config%", + "patternProperties": { + ".*": { + "type": [ + "string", + "array" + ] + } + }, + "scope": "resource", + "title": "config", + "type": "object" + }, "Lua.runtime.builtin": { "additionalProperties": false, "markdownDescription": "%config.runtime.builtin%", @@ -2508,6 +2754,26 @@ ], "type": "string" }, + "jit.profile": { + "default": "default", + "description": "%config.runtime.builtin.jit.profile%", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, + "jit.util": { + "default": "default", + "description": "%config.runtime.builtin.jit.util%", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, "math": { "default": "default", "description": "%config.runtime.builtin.math%", @@ -2839,10 +3105,12 @@ "type": "boolean" }, "Lua.workspace.checkThirdParty": { - "default": true, "markdownDescription": "%config.workspace.checkThirdParty%", "scope": "resource", - "type": "boolean" + "type": [ + "string", + "boolean" + ] }, "Lua.workspace.ignoreDir": { "default": [ @@ -2940,6 +3208,11 @@ "command": "lua.addon_manager.open", "group": "z_commands", "when": "resourceLangId == lua" + }, + { + "command": "lua.reloadFFIMeta", + "group": "z_commands", + "when": "resourceLangId == lua" } ] }, @@ -3088,5 +3361,5 @@ "sponsor": { "url": "https://github.com/LuaLS/lua-language-server/issues/484" }, - "version": "3.6.17" + "version": "3.7.4" } diff --git a/package.nls.json b/package.nls.json index 38501e76cde2de2ea8ae6f157a43b85e839c5446..371a4e119c3778b625db6c297b2c8409e109e2e8 100644 --- a/package.nls.json +++ b/package.nls.json @@ -1,10 +1,7 @@ { "command.addon_manager.open": "Lua: Open Addon Manager ...", "command.exportDocument": "Lua: Export Document ...", - "config.IntelliSense.traceBeSetted": "Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "config.IntelliSense.traceFieldInject": "Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "config.IntelliSense.traceLocalSet": "Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "config.IntelliSense.traceReturn": "Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", + "command.reloadFFIMeta": "Lua: Reload luajit ffi meta", "config.addonManager.enable": "Whether the addon manager is enabled or not.", "config.codeLens.enable": "Enable code lens.", "config.color.mode": "Color mode.", @@ -40,12 +37,13 @@ "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": "", + "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.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", + "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.", @@ -62,6 +60,7 @@ "config.diagnostics.empty-block": "Enable empty code block diagnostics.", "config.diagnostics.enable": "Enable diagnostics.", "config.diagnostics.global": "* global-in-nil-env\n* lowercase-global\n* undefined-env-child\n* undefined-global", + "config.diagnostics.global-element": "Enable diagnostics to warn about global elements.", "config.diagnostics.global-in-nil-env": "Enable cannot use global variables ( `_ENV` is set to `nil`) diagnostics.", "config.diagnostics.globals": "Defined global variables.", "config.diagnostics.groupFileStatus": "Modify the diagnostic needed file status in a group.\n\n* Opened: only diagnose opened files\n* Any: diagnose all files\n* None: disable this diagnostic\n\n`Fallback` means that diagnostics in this group are controlled by `diagnostics.neededFileStatus` separately.\nOther settings will override individual settings without end of `!`.\n", @@ -71,16 +70,22 @@ "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.incomplete-signature-doc": "Incomplete @param or @return annotations for functions.", + "config.diagnostics.inject-field": "TODO: Needs documentation", "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.lowercase-global": "Enable lowercase global variable definition diagnostics.", - "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.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.neededFileStatus": "* Opened: only diagnose opened files\n* Any: diagnose all files\n* None: disable this diagnostic\n\nEnd with `!` means override the group setting `diagnostics.groupFileStatus`.\n", "config.diagnostics.newfield-call": "Enable newfield call diagnostics. It is raised when the parenthesis of a function call appear on the following line when defining a field in a table.", @@ -100,8 +105,8 @@ "config.diagnostics.strict": "* close-non-object\n* deprecated\n* discard-returns\n* invisible", "config.diagnostics.strong": "* no-unknown", "config.diagnostics.trailing-space": "Enable trailing space diagnostics.", - "config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", - "config.diagnostics.unbalanced": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "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.", @@ -158,51 +163,54 @@ "config.intelliSense.searchDepth": "Set the search depth for IntelliSense. Increasing this value increases accuracy, but decreases performance. Different workspace have different tolerance for this setting. Please adjust it to the appropriate value.", "config.misc.executablePath": "Specify the executable path in VSCode.", "config.misc.parameters": "[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language server in VSCode.", + "config.nameStyle.config": "Set name style config", "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.builtin.basic": "", - "config.runtime.builtin.bit": "", - "config.runtime.builtin.bit32": "", - "config.runtime.builtin.builtin": "", - "config.runtime.builtin.coroutine": "", - "config.runtime.builtin.debug": "", - "config.runtime.builtin.ffi": "", - "config.runtime.builtin.io": "", - "config.runtime.builtin.jit": "", - "config.runtime.builtin.math": "", - "config.runtime.builtin.os": "", - "config.runtime.builtin.package": "", - "config.runtime.builtin.string": "", - "config.runtime.builtin.string.buffer": "", - "config.runtime.builtin.table": "", - "config.runtime.builtin.table.clear": "", - "config.runtime.builtin.table.new": "", - "config.runtime.builtin.utf8": "", + "config.runtime.builtin.basic": "TODO: Needs documentation", + "config.runtime.builtin.bit": "TODO: Needs documentation", + "config.runtime.builtin.bit32": "TODO: Needs documentation", + "config.runtime.builtin.builtin": "TODO: Needs documentation", + "config.runtime.builtin.coroutine": "TODO: Needs documentation", + "config.runtime.builtin.debug": "TODO: Needs documentation", + "config.runtime.builtin.ffi": "TODO: Needs documentation", + "config.runtime.builtin.io": "TODO: Needs documentation", + "config.runtime.builtin.jit": "TODO: Needs documentation", + "config.runtime.builtin.jit.profile": "TODO: Needs documentation", + "config.runtime.builtin.jit.util": "TODO: Needs documentation", + "config.runtime.builtin.math": "TODO: Needs documentation", + "config.runtime.builtin.os": "TODO: Needs documentation", + "config.runtime.builtin.package": "TODO: Needs documentation", + "config.runtime.builtin.string": "TODO: Needs documentation", + "config.runtime.builtin.string.buffer": "TODO: Needs documentation", + "config.runtime.builtin.table": "TODO: Needs documentation", + "config.runtime.builtin.table.clear": "TODO: Needs documentation", + "config.runtime.builtin.table.new": "TODO: Needs documentation", + "config.runtime.builtin.utf8": "TODO: Needs documentation", "config.runtime.fileEncoding": "File encoding. The `ansi` option is only available under the `Windows` platform.", - "config.runtime.fileEncoding.ansi": "", - "config.runtime.fileEncoding.utf16be": "", - "config.runtime.fileEncoding.utf16le": "", - "config.runtime.fileEncoding.utf8": "", + "config.runtime.fileEncoding.ansi": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf16be": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf16le": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf8": "TODO: Needs documentation", "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", "config.runtime.pathStrict": "When enabled, `runtime.path` will only search the first level of directories, see the description of `runtime.path`.", - "config.runtime.plugin": "Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more.", + "config.runtime.plugin": "Plugin path. Please read [wiki](https://luals.github.io/wiki/plugins) to learn more.", "config.runtime.pluginArgs": "Additional arguments for the plugin.", "config.runtime.special": "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", "config.runtime.unicodeName": "Allows Unicode characters in name.", "config.runtime.version": "Lua runtime version.", - "config.runtime.version.Lua 5.1": "", - "config.runtime.version.Lua 5.2": "", - "config.runtime.version.Lua 5.3": "", - "config.runtime.version.Lua 5.4": "", - "config.runtime.version.LuaJIT": "", + "config.runtime.version.Lua 5.1": "TODO: Needs documentation", + "config.runtime.version.Lua 5.2": "TODO: Needs documentation", + "config.runtime.version.Lua 5.3": "TODO: Needs documentation", + "config.runtime.version.Lua 5.4": "TODO: Needs documentation", + "config.runtime.version.LuaJIT": "TODO: Needs documentation", "config.semantic.annotation": "Semantic coloring of type annotations.", "config.semantic.enable": "Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.", "config.semantic.keyword": "Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.", "config.semantic.variable": "Semantic coloring of variables/fields/parameters.", "config.signatureHelp.enable": "Enable signature help.", "config.spell.dict": "Custom words for spell checking.", - "config.telemetry.enable": "Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy).\n", + "config.telemetry.enable": "Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://luals.github.io/privacy/#language-server).\n", "config.type.castNumberToInteger": "Allowed to assign the `number` type to the `integer` type.", "config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.type.weakUnionCheck": "Once one subtype of a union type meets the condition, the union type also meets the condition.\n\nWhen this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.\n", diff --git a/package.nls.pt-br.json b/package.nls.pt-br.json index 84b3195259b6c1be6783b59f479307129d27c984..952c7741e0fced64b4767dcb9d31dede0b755ed8 100644 --- a/package.nls.pt-br.json +++ b/package.nls.pt-br.json @@ -1,10 +1,7 @@ { "command.addon_manager.open": "Lua: Open Addon Manager ...", "command.exportDocument": "Lua: Export Document ...", - "config.IntelliSense.traceBeSetted": "Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "config.IntelliSense.traceFieldInject": "Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "config.IntelliSense.traceLocalSet": "Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", - "config.IntelliSense.traceReturn": "Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features) to learn more.", + "command.reloadFFIMeta": "Lua: Reload luajit ffi meta", "config.addonManager.enable": "Whether the addon manager is enabled or not.", "config.codeLens.enable": "Enable code lens.", "config.color.mode": "Color mode.", @@ -40,12 +37,13 @@ "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": "", + "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.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", + "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.", @@ -62,6 +60,7 @@ "config.diagnostics.empty-block": "空代码块", "config.diagnostics.enable": "Enable diagnostics.", "config.diagnostics.global": "* global-in-nil-env\n* lowercase-global\n* undefined-env-child\n* undefined-global", + "config.diagnostics.global-element": "Enable diagnostics to warn about global elements.", "config.diagnostics.global-in-nil-env": "不能使用全局变量( `_ENV` 被设置为了 `nil`)", "config.diagnostics.globals": "Defined global variables.", "config.diagnostics.groupFileStatus": "Modify the diagnostic needed file status in a group.\n\n* Opened: only diagnose opened files\n* Any: diagnose all files\n* None: disable this diagnostic\n\n`Fallback` means that diagnostics in this group are controlled by `diagnostics.neededFileStatus` separately.\nOther settings will override individual settings without end of `!`.\n", @@ -71,16 +70,22 @@ "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.incomplete-signature-doc": "Incomplete @param or @return annotations for functions.", + "config.diagnostics.inject-field": "TODO: Needs documentation", "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.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.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.neededFileStatus": "* Opened: only diagnose opened files\n* Any: diagnose all files\n* None: disable this diagnostic\n\nEnd with `!` means override the group setting `diagnostics.groupFileStatus`.\n", "config.diagnostics.newfield-call": "在字面量表中,2行代码之间缺少分隔符,在语法上被解析为了一次索引操作", @@ -100,8 +105,8 @@ "config.diagnostics.strict": "* close-non-object\n* deprecated\n* discard-returns\n* invisible", "config.diagnostics.strong": "* no-unknown", "config.diagnostics.trailing-space": "后置空格", - "config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", - "config.diagnostics.unbalanced": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "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.", @@ -158,51 +163,54 @@ "config.intelliSense.searchDepth": "Set the search depth for IntelliSense. Increasing this value increases accuracy, but decreases performance. Different workspace have different tolerance for this setting. Please adjust it to the appropriate value.", "config.misc.executablePath": "Specify the executable path in VSCode.", "config.misc.parameters": "[Command line parameters](https://github.com/LuaLS/lua-telemetry-server/tree/master/method) when starting the language service in VSCode.", + "config.nameStyle.config": "Set name style config", "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.builtin.basic": "", - "config.runtime.builtin.bit": "", - "config.runtime.builtin.bit32": "", - "config.runtime.builtin.builtin": "", - "config.runtime.builtin.coroutine": "", - "config.runtime.builtin.debug": "", - "config.runtime.builtin.ffi": "", - "config.runtime.builtin.io": "", - "config.runtime.builtin.jit": "", - "config.runtime.builtin.math": "", - "config.runtime.builtin.os": "", - "config.runtime.builtin.package": "", - "config.runtime.builtin.string": "", - "config.runtime.builtin.string.buffer": "", - "config.runtime.builtin.table": "", - "config.runtime.builtin.table.clear": "", - "config.runtime.builtin.table.new": "", - "config.runtime.builtin.utf8": "", + "config.runtime.builtin.basic": "TODO: Needs documentation", + "config.runtime.builtin.bit": "TODO: Needs documentation", + "config.runtime.builtin.bit32": "TODO: Needs documentation", + "config.runtime.builtin.builtin": "TODO: Needs documentation", + "config.runtime.builtin.coroutine": "TODO: Needs documentation", + "config.runtime.builtin.debug": "TODO: Needs documentation", + "config.runtime.builtin.ffi": "TODO: Needs documentation", + "config.runtime.builtin.io": "TODO: Needs documentation", + "config.runtime.builtin.jit": "TODO: Needs documentation", + "config.runtime.builtin.jit.profile": "TODO: Needs documentation", + "config.runtime.builtin.jit.util": "TODO: Needs documentation", + "config.runtime.builtin.math": "TODO: Needs documentation", + "config.runtime.builtin.os": "TODO: Needs documentation", + "config.runtime.builtin.package": "TODO: Needs documentation", + "config.runtime.builtin.string": "TODO: Needs documentation", + "config.runtime.builtin.string.buffer": "TODO: Needs documentation", + "config.runtime.builtin.table": "TODO: Needs documentation", + "config.runtime.builtin.table.clear": "TODO: Needs documentation", + "config.runtime.builtin.table.new": "TODO: Needs documentation", + "config.runtime.builtin.utf8": "TODO: Needs documentation", "config.runtime.fileEncoding": "File encoding. The `ansi` option is only available under the `Windows` platform.", - "config.runtime.fileEncoding.ansi": "", - "config.runtime.fileEncoding.utf16be": "", - "config.runtime.fileEncoding.utf16le": "", - "config.runtime.fileEncoding.utf8": "", + "config.runtime.fileEncoding.ansi": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf16be": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf16le": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf8": "TODO: Needs documentation", "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", "config.runtime.pathStrict": "When enabled, `runtime.path` will only search the first level of directories, see the description of `runtime.path`.", - "config.runtime.plugin": "Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more.", + "config.runtime.plugin": "Plugin path. Please read [wiki](https://luals.github.io/wiki/plugins) to learn more.", "config.runtime.pluginArgs": "Additional arguments for the plugin.", "config.runtime.special": "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", "config.runtime.unicodeName": "Allows Unicode characters in name.", "config.runtime.version": "Lua runtime version.", - "config.runtime.version.Lua 5.1": "", - "config.runtime.version.Lua 5.2": "", - "config.runtime.version.Lua 5.3": "", - "config.runtime.version.Lua 5.4": "", - "config.runtime.version.LuaJIT": "", + "config.runtime.version.Lua 5.1": "TODO: Needs documentation", + "config.runtime.version.Lua 5.2": "TODO: Needs documentation", + "config.runtime.version.Lua 5.3": "TODO: Needs documentation", + "config.runtime.version.Lua 5.4": "TODO: Needs documentation", + "config.runtime.version.LuaJIT": "TODO: Needs documentation", "config.semantic.annotation": "Semantic coloring of type annotations.", "config.semantic.enable": "Enable semantic color. You may need to set `editor.semanticHighlighting.enabled` to `true` to take effect.", "config.semantic.keyword": "Semantic coloring of keywords/literals/operators. You only need to enable this feature if your editor cannot do syntax coloring.", "config.semantic.variable": "Semantic coloring of variables/fields/parameters.", "config.signatureHelp.enable": "Enable signature help.", "config.spell.dict": "Custom words for spell checking.", - "config.telemetry.enable": "Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy).\n", + "config.telemetry.enable": "Enable telemetry to send your editor information and error logs over the network. Read our privacy policy [here](https://luals.github.io/privacy/#language-server).\n", "config.type.castNumberToInteger": "Allowed to assign the `number` type to the `integer` type.", "config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.type.weakUnionCheck": "Once one subtype of a union type meets the condition, the union type also meets the condition.\n\nWhen this setting is `false`, the `number|boolean` type cannot be assigned to the `number` type. It can be with `true`.\n", diff --git a/package.nls.zh-cn.json b/package.nls.zh-cn.json index dc17bad58b5ac9cf8f0abfbb114a1cea71b110d1..b85111e96fdc21ecc9ef5e26edadefbc2afc3645 100644 --- a/package.nls.zh-cn.json +++ b/package.nls.zh-cn.json @@ -1,11 +1,8 @@ { "command.addon_manager.open": "Lua: 打开插件管理器...", "command.exportDocument": "Lua: 导出文档...", - "config.IntelliSense.traceBeSetted": "请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", - "config.IntelliSense.traceFieldInject": "请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", - "config.IntelliSense.traceLocalSet": "请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", - "config.IntelliSense.traceReturn": "请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)了解用法。", - "config.addonManager.enable": "Whether the addon manager is enabled or not.", + "command.reloadFFIMeta": "Lua: 重新生成luajit的FFI模块C语言元数据", + "config.addonManager.enable": "是否启用扩展的附加插件管理器(Addon Manager)", "config.codeLens.enable": "启用代码度量。", "config.color.mode": "着色模式。", "config.color.mode.Grammar": "语法着色。", @@ -35,33 +32,35 @@ "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.circle-doc-class": "", - "config.diagnostics.circular-doc-class": "Enable diagnostics for two classes inheriting from each other introducing a circular relation.", + "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": "两个类相互继承并互相循环", "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", + "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.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.conventions": "* global-element", + "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", + "config.diagnostics.global-element": "Enable diagnostics to warn about global elements.", "config.diagnostics.global-in-nil-env": "不能使用全局变量( `_ENV` 被设置为了 `nil`)", "config.diagnostics.globals": "已定义的全局变量。", "config.diagnostics.groupFileStatus": "批量修改一个组中的文件状态。\n\n* Opened: 只诊断打开的文件\n* Any: 诊断任何文件\n* None: 禁用此诊断\n\n设置为 `Fallback` 意味着组中的诊断由 `diagnostics.neededFileStatus` 单独设置。\n其他设置将覆盖单独设置,但是不会覆盖以 `!` 结尾的设置。\n", @@ -71,48 +70,54 @@ "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.incomplete-signature-doc": "`@param`或`@return`的注释不完整", + "config.diagnostics.inject-field": "TODO: Needs documentation", + "config.diagnostics.invisible": "使用不可见的值", "config.diagnostics.libraryFiles": "如何诊断通过 `Lua.workspace.library` 加载的文件。", "config.diagnostics.libraryFiles.Disable": "不诊断这些文件。", "config.diagnostics.libraryFiles.Enable": "总是诊断这些文件。", "config.diagnostics.libraryFiles.Opened": "只有打开这些文件时才会诊断。", "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.", - "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.need-check-nil": "Enable diagnostics for variable usages if `nil` or an optional (potentially `nil`) value was assigned to the variable before.", + "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": "全局变量的注释缺失(全局函数必须为所有参数和返回值提供注释和注释)", + "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", "config.diagnostics.strong": "* no-unknown", "config.diagnostics.trailing-space": "后置空格", - "config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", - "config.diagnostics.unbalanced": "* 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.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": "多重赋值时没有赋值所有变量(如`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": "未使用的标签", @@ -157,59 +162,62 @@ "config.intelliSense.fastGlobal": "在对全局变量进行补全,及查看 `_G` 的悬浮提示时进行优化。这会略微降低类型推测的准确度,但是对于大量使用全局变量的项目会有大幅的性能提升。", "config.intelliSense.searchDepth": "设置智能感知的搜索深度。增大该值可以增加准确度,但会降低性能。不同的项目对该设置的容忍度差异较大,请自己调整为合适的值。", "config.misc.executablePath": "VSCode中指定可执行文件路径。", - "config.misc.parameters": "VSCode中启动语言服务时的[命令行参数](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#arguments)。", + "config.misc.parameters": "VSCode中启动语言服务时的[命令行参数](https://luals.github.io/wiki/usage#arguments)。", + "config.nameStyle.config": "设定命名风格检查的配置", "config.runtime.builtin": "调整内置库的启用状态,你可以根据实际运行环境禁用掉不存在的库(或重新定义)。\n\n* `default`: 表示库会根据运行版本启用或禁用\n* `enable`: 总是启用\n* `disable`: 总是禁用\n", - "config.runtime.builtin.basic": "", - "config.runtime.builtin.bit": "", - "config.runtime.builtin.bit32": "", - "config.runtime.builtin.builtin": "", - "config.runtime.builtin.coroutine": "", - "config.runtime.builtin.debug": "", - "config.runtime.builtin.ffi": "", - "config.runtime.builtin.io": "", - "config.runtime.builtin.jit": "", - "config.runtime.builtin.math": "", - "config.runtime.builtin.os": "", - "config.runtime.builtin.package": "", - "config.runtime.builtin.string": "", - "config.runtime.builtin.string.buffer": "", - "config.runtime.builtin.table": "", - "config.runtime.builtin.table.clear": "", - "config.runtime.builtin.table.new": "", - "config.runtime.builtin.utf8": "", + "config.runtime.builtin.basic": "TODO: Needs documentation", + "config.runtime.builtin.bit": "TODO: Needs documentation", + "config.runtime.builtin.bit32": "TODO: Needs documentation", + "config.runtime.builtin.builtin": "TODO: Needs documentation", + "config.runtime.builtin.coroutine": "TODO: Needs documentation", + "config.runtime.builtin.debug": "TODO: Needs documentation", + "config.runtime.builtin.ffi": "TODO: Needs documentation", + "config.runtime.builtin.io": "TODO: Needs documentation", + "config.runtime.builtin.jit": "TODO: Needs documentation", + "config.runtime.builtin.jit.profile": "TODO: Needs documentation", + "config.runtime.builtin.jit.util": "TODO: Needs documentation", + "config.runtime.builtin.math": "TODO: Needs documentation", + "config.runtime.builtin.os": "TODO: Needs documentation", + "config.runtime.builtin.package": "TODO: Needs documentation", + "config.runtime.builtin.string": "TODO: Needs documentation", + "config.runtime.builtin.string.buffer": "TODO: Needs documentation", + "config.runtime.builtin.table": "TODO: Needs documentation", + "config.runtime.builtin.table.clear": "TODO: Needs documentation", + "config.runtime.builtin.table.new": "TODO: Needs documentation", + "config.runtime.builtin.utf8": "TODO: Needs documentation", "config.runtime.fileEncoding": "文件编码,`ansi` 选项只在 `Windows` 平台下有效。", - "config.runtime.fileEncoding.ansi": "", - "config.runtime.fileEncoding.utf16be": "", - "config.runtime.fileEncoding.utf16le": "", - "config.runtime.fileEncoding.utf8": "", + "config.runtime.fileEncoding.ansi": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf16be": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf16le": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf8": "TODO: Needs documentation", "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", "config.runtime.pathStrict": "启用后 `runtime.path` 将只搜索第一层目录,见 `runtime.path` 的说明。", - "config.runtime.plugin": "插件路径,请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/Plugins)了解用法。", + "config.runtime.plugin": "插件路径,请查阅[文档](https://luals.github.io/wiki/plugins)了解用法。", "config.runtime.pluginArgs": "Additional arguments for the plugin.", "config.runtime.special": "将自定义全局变量视为一些特殊的内置变量,语言服务将提供特殊的支持。\n下面这个例子表示将 `include` 视为 `require` 。\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n", "config.runtime.unicodeName": "允许在名字中使用 Unicode 字符。", "config.runtime.version": "Lua运行版本。", - "config.runtime.version.Lua 5.1": "", - "config.runtime.version.Lua 5.2": "", - "config.runtime.version.Lua 5.3": "", - "config.runtime.version.Lua 5.4": "", - "config.runtime.version.LuaJIT": "", + "config.runtime.version.Lua 5.1": "TODO: Needs documentation", + "config.runtime.version.Lua 5.2": "TODO: Needs documentation", + "config.runtime.version.Lua 5.3": "TODO: Needs documentation", + "config.runtime.version.Lua 5.4": "TODO: Needs documentation", + "config.runtime.version.LuaJIT": "TODO: Needs documentation", "config.semantic.annotation": "对类型注解进行语义着色。", "config.semantic.enable": "启用语义着色。你可能需要同时将 `editor.semanticHighlighting.enabled` 设置为 `true` 才能生效。", "config.semantic.keyword": "对关键字/字面量/运算符进行语义着色。只有当你的编辑器无法进行语法着色时才需要启用此功能。", "config.semantic.variable": "对变量/字段/参数进行语义着色。", "config.signatureHelp.enable": "启用参数提示。", "config.spell.dict": "拼写检查的自定义单词。", - "config.telemetry.enable": "启用遥测,通过网络发送你的编辑器信息与错误日志。在[此处](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy)阅读我们的隐私声明。\n", + "config.telemetry.enable": "启用遥测,通过网络发送你的编辑器信息与错误日志。在[此处](https://luals.github.io/privacy/#language-server)阅读我们的隐私声明。\n", "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.nls.zh-tw.json b/package.nls.zh-tw.json index f87b377781ff200d93265ea0ddcf33f2436ddbf7..056e0ae90f5c885c44d488cb0b1af2bc3db6a3ec 100644 --- a/package.nls.zh-tw.json +++ b/package.nls.zh-tw.json @@ -1,10 +1,7 @@ { "command.addon_manager.open": "Lua: Open Addon Manager ...", "command.exportDocument": "Lua: Export Document ...", - "config.IntelliSense.traceBeSetted": "請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", - "config.IntelliSense.traceFieldInject": "請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", - "config.IntelliSense.traceLocalSet": "請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", - "config.IntelliSense.traceReturn": "請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/IntelliSense-optional-features)瞭解用法。", + "command.reloadFFIMeta": "Lua: Reload luajit ffi meta", "config.addonManager.enable": "Whether the addon manager is enabled or not.", "config.codeLens.enable": "Enable code lens.", "config.color.mode": "著色模式。", @@ -40,12 +37,13 @@ "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": "", + "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.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", + "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.", @@ -62,6 +60,7 @@ "config.diagnostics.empty-block": "空程式碼區塊", "config.diagnostics.enable": "啟用診斷。", "config.diagnostics.global": "* global-in-nil-env\n* lowercase-global\n* undefined-env-child\n* undefined-global", + "config.diagnostics.global-element": "Enable diagnostics to warn about global elements.", "config.diagnostics.global-in-nil-env": "不能使用全域變數( `_ENV` 被設定為 `nil`)", "config.diagnostics.globals": "已定義的全域變數。", "config.diagnostics.groupFileStatus": "批量修改一個組中的檔案狀態。\n\n* Opened: 只診斷打開的檔案\n* Any: 診斷所有檔案\n* None: 停用此診斷\n\n設定為 `Fallback` 意味著組中的診斷由 `diagnostics.neededFileStatus` 單獨設定。\n其他設定將覆蓋單獨設定,但是不會覆蓋以 `!` 結尾的設定。\n", @@ -71,16 +70,22 @@ "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.inject-field": "TODO: Needs documentation", "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.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.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.neededFileStatus": "* Opened: 只診斷打開的檔案\n* Any: 診斷所有檔案\n* None: 停用此診斷\n\n以 `!` 結尾的設定優先順序高於組設定 `diagnostics.groupFileStatus`。\n", "config.diagnostics.newfield-call": "在字面常數表中,2行程式碼之間缺少分隔符,在語法上被解析為了一次索引操作", @@ -100,8 +105,8 @@ "config.diagnostics.strict": "* close-non-object\n* deprecated\n* discard-returns\n* invisible", "config.diagnostics.strong": "* no-unknown", "config.diagnostics.trailing-space": "後置空格", - "config.diagnostics.type-check": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", - "config.diagnostics.unbalanced": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "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.", @@ -157,52 +162,55 @@ "config.intelliSense.fastGlobal": "在對全域變數進行補全,及檢視 `_G` 的懸浮提示時進行最佳化。這會略微降低類型推測的準確度,但是對於大量使用全域變數的專案會有大幅的效能提升。", "config.intelliSense.searchDepth": "設定智慧感知的搜尋深度。增大該值可以增加準確度,但會降低效能。不同的工作區對該設定的容忍度差異較大,請自己調整為合適的值。", "config.misc.executablePath": "Specify the executable path in VSCode.", - "config.misc.parameters": "VSCode中啟動語言伺服時的[命令列參數](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#arguments)。", + "config.misc.parameters": "VSCode中啟動語言伺服時的[命令列參數](https://luals.github.io/wiki/usage#arguments)。", + "config.nameStyle.config": "Set name style config", "config.runtime.builtin": "調整內建庫的啟用狀態,你可以根據實際執行環境停用(或重新定義)不存在的庫。\n\n* `default`: 表示庫會根據執行版本啟用或停用\n* `enable`: 總是啟用\n* `disable`: 總是停用\n", - "config.runtime.builtin.basic": "", - "config.runtime.builtin.bit": "", - "config.runtime.builtin.bit32": "", - "config.runtime.builtin.builtin": "", - "config.runtime.builtin.coroutine": "", - "config.runtime.builtin.debug": "", - "config.runtime.builtin.ffi": "", - "config.runtime.builtin.io": "", - "config.runtime.builtin.jit": "", - "config.runtime.builtin.math": "", - "config.runtime.builtin.os": "", - "config.runtime.builtin.package": "", - "config.runtime.builtin.string": "", - "config.runtime.builtin.string.buffer": "", - "config.runtime.builtin.table": "", - "config.runtime.builtin.table.clear": "", - "config.runtime.builtin.table.new": "", - "config.runtime.builtin.utf8": "", + "config.runtime.builtin.basic": "TODO: Needs documentation", + "config.runtime.builtin.bit": "TODO: Needs documentation", + "config.runtime.builtin.bit32": "TODO: Needs documentation", + "config.runtime.builtin.builtin": "TODO: Needs documentation", + "config.runtime.builtin.coroutine": "TODO: Needs documentation", + "config.runtime.builtin.debug": "TODO: Needs documentation", + "config.runtime.builtin.ffi": "TODO: Needs documentation", + "config.runtime.builtin.io": "TODO: Needs documentation", + "config.runtime.builtin.jit": "TODO: Needs documentation", + "config.runtime.builtin.jit.profile": "TODO: Needs documentation", + "config.runtime.builtin.jit.util": "TODO: Needs documentation", + "config.runtime.builtin.math": "TODO: Needs documentation", + "config.runtime.builtin.os": "TODO: Needs documentation", + "config.runtime.builtin.package": "TODO: Needs documentation", + "config.runtime.builtin.string": "TODO: Needs documentation", + "config.runtime.builtin.string.buffer": "TODO: Needs documentation", + "config.runtime.builtin.table": "TODO: Needs documentation", + "config.runtime.builtin.table.clear": "TODO: Needs documentation", + "config.runtime.builtin.table.new": "TODO: Needs documentation", + "config.runtime.builtin.utf8": "TODO: Needs documentation", "config.runtime.fileEncoding": "檔案編碼,選項 `ansi` 只在 `Windows` 平台下有效。", - "config.runtime.fileEncoding.ansi": "", - "config.runtime.fileEncoding.utf16be": "", - "config.runtime.fileEncoding.utf16le": "", - "config.runtime.fileEncoding.utf8": "", + "config.runtime.fileEncoding.ansi": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf16be": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf16le": "TODO: Needs documentation", + "config.runtime.fileEncoding.utf8": "TODO: Needs documentation", "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", "config.runtime.pathStrict": "啟用後 `runtime.path` 將只搜尋第一層目錄,見 `runtime.path` 的説明。", - "config.runtime.plugin": "延伸模組路徑,請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/Plugins)瞭解用法。", + "config.runtime.plugin": "延伸模組路徑,請查閱[文件](https://luals.github.io/wiki/plugins)瞭解用法。", "config.runtime.pluginArgs": "Additional arguments for the plugin.", "config.runtime.special": "將自訂全域變數視為一些特殊的內建變數,語言伺服將提供特殊的支援。\n下面這個例子表示將 `include` 視為 `require` 。\n```json\n\"Lua.runtime.special\" : {\n \"include\" : \"require\"\n}\n```\n", "config.runtime.unicodeName": "允許在名字中使用 Unicode 字元。", "config.runtime.version": "Lua執行版本。", - "config.runtime.version.Lua 5.1": "", - "config.runtime.version.Lua 5.2": "", - "config.runtime.version.Lua 5.3": "", - "config.runtime.version.Lua 5.4": "", - "config.runtime.version.LuaJIT": "", + "config.runtime.version.Lua 5.1": "TODO: Needs documentation", + "config.runtime.version.Lua 5.2": "TODO: Needs documentation", + "config.runtime.version.Lua 5.3": "TODO: Needs documentation", + "config.runtime.version.Lua 5.4": "TODO: Needs documentation", + "config.runtime.version.LuaJIT": "TODO: Needs documentation", "config.semantic.annotation": "對類型註解進行語義著色。", "config.semantic.enable": "啟用語義著色。你可能需要同時將 `editor.semanticHighlighting.enabled` 設定為 `true` 才能生效。", "config.semantic.keyword": "對關鍵字/字面常數/運算子進行語義著色。只有當你的編輯器無法進行語法著色時才需要啟用此功能。", "config.semantic.variable": "對變數/欄位/參數進行語義著色。", "config.signatureHelp.enable": "啟用參數提示。", "config.spell.dict": "拼寫檢查的自訂單詞。", - "config.telemetry.enable": "啟用遙測,透過網路發送你的編輯器資訊與錯誤日誌。在[此處](https://github.com/LuaLS/lua-language-server/wiki/Home#privacy)閱讀我們的隱私聲明。\n", + "config.telemetry.enable": "啟用遙測,透過網路發送你的編輯器資訊與錯誤日誌。在[此處](https://luals.github.io/privacy/#language-server)閱讀我們的隱私聲明。\n", "config.type.castNumberToInteger": "允許將 `number` 類型賦值給 `integer` 類型。", "config.type.weakNilCheck": "When checking the type of union type, ignore the `nil` in it.\n\nWhen this setting is `false`, the `number|nil` type cannot be assigned to the `number` type. It can be with `true`.\n", "config.type.weakUnionCheck": "同位類型中只要有一個子類型滿足條件,則同位類型也滿足條件。\n\n此設定為 `false` 時,`number|boolean` 類型無法賦給 `number` 類型;為 `true` 時則可以。\n", diff --git a/package/build.lua b/package/build.lua index 756520f6d2361801b4cf62dc3a24a89e57daaf07..7fe544b50ddcfc6f5c00621dc0b8b00fbd7c59ee 100644 --- a/package/build.lua +++ b/package/build.lua @@ -1,6 +1,6 @@ local json = require 'json-beautify' -local VERSION = "3.6.17" +local VERSION = "3.7.4" local package = require 'package.package' local fsu = require 'fs-utility' diff --git a/package/package.lua b/package/package.lua index 1869b66fde411891e9b0463dfa1870a751384d26..a2e20e1e8784449f9cf8373b100dd3bfd7088fc4 100644 --- a/package/package.lua +++ b/package/package.lua @@ -47,6 +47,10 @@ return { command = "lua.exportDocument", title = "%command.exportDocument%", }, + { + command = "lua.reloadFFIMeta", + title = "%command.reloadFFIMeta%", + }, }, menus = { ["editor/context"] = { @@ -60,6 +64,11 @@ return { command = "lua.addon_manager.open", group = "z_commands", }, + { + when = "resourceLangId == lua", + command = "lua.reloadFFIMeta", + group = "z_commands" + }, } }, configuration = { diff --git a/setting/schema-pt-br.json b/setting/schema-pt-br.json index 37d9dbbc6de1cc5ced634d0d0b831764f3239ef3..e4ba7c8924905f6b9a08d78a7d55e2518318f741 100644 --- a/setting/schema-pt-br.json +++ b/setting/schema-pt-br.json @@ -238,8 +238,11 @@ "err-nonstandard-symbol", "err-then-as-do", "exp-in-action", + "global-element", "global-in-nil-env", + "incomplete-signature-doc", "index-in-func-name", + "inject-field", "invisible", "jump-local-scope", "keyword", @@ -283,9 +286,13 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", + "missing-global-doc", + "missing-local-export-doc", "missing-parameter", "missing-return", "missing-return-value", + "name-style-check", "need-check-nil", "need-paren", "nesting-long-mark", @@ -389,7 +396,18 @@ }, "codestyle": { "default": "Fallback", - "description": "* codestyle-check\n* spell-check", + "description": "* codestyle-check\n* name-style-check\n* spell-check", + "enum": [ + "Any", + "Opened", + "None", + "Fallback" + ], + "type": "string" + }, + "conventions": { + "default": "Fallback", + "description": "* global-element", "enum": [ "Any", "Opened", @@ -422,7 +440,7 @@ }, "luadoc": { "default": "Fallback", - "description": "* 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", + "description": "* 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", "enum": [ "Any", "Opened", @@ -466,7 +484,7 @@ }, "type-check": { "default": "Fallback", - "description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", + "description": "* 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", "enum": [ "Any", "Opened", @@ -477,7 +495,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* 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", "enum": [ "Any", "Opened", @@ -532,7 +550,19 @@ }, "codestyle": { "default": "Fallback", - "description": "* codestyle-check\n* spell-check", + "description": "* codestyle-check\n* name-style-check\n* spell-check", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Fallback" + ], + "type": "string" + }, + "conventions": { + "default": "Fallback", + "description": "* global-element", "enum": [ "Error", "Warning", @@ -568,7 +598,7 @@ }, "luadoc": { "default": "Fallback", - "description": "* 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", + "description": "* 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", "enum": [ "Error", "Warning", @@ -616,7 +646,7 @@ }, "type-check": { "default": "Fallback", - "description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", + "description": "* 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", "enum": [ "Error", "Warning", @@ -628,7 +658,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* 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", "enum": [ "Error", "Warning", @@ -775,7 +805,7 @@ }, "circle-doc-class": { "default": "Any", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "Any", "Opened", @@ -968,6 +998,19 @@ ], "type": "string" }, + "global-element": { + "default": "None", + "description": "Enable diagnostics to warn about global elements.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Any", "description": "不能使用全局变量( `_ENV` 被设置为了 `nil`)", @@ -981,6 +1024,32 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "None", + "description": "Incomplete @param or @return annotations for functions.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "inject-field": { + "default": "Opened", + "description": "TODO: Needs documentation", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "invisible": { "default": "Any", "description": "Enable diagnostics for accesses to fields which are invisible.", @@ -1007,6 +1076,45 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "TODO: Needs documentation", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "None", + "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "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.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "missing-parameter": { "default": "Any", "description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -1046,6 +1154,19 @@ ], "type": "string" }, + "name-style-check": { + "default": "None", + "description": "Enable diagnostics for name style.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "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.", @@ -1509,7 +1630,7 @@ }, "circle-doc-class": { "default": "Warning", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "Error", "Warning", @@ -1732,6 +1853,21 @@ ], "type": "string" }, + "global-element": { + "default": "Warning", + "description": "Enable diagnostics to warn about global elements.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Warning", "description": "不能使用全局变量( `_ENV` 被设置为了 `nil`)", @@ -1747,6 +1883,36 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "Warning", + "description": "Incomplete @param or @return annotations for functions.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "inject-field": { + "default": "Warning", + "description": "TODO: Needs documentation", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "invisible": { "default": "Warning", "description": "Enable diagnostics for accesses to fields which are invisible.", @@ -1777,6 +1943,51 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "TODO: Needs documentation", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "Warning", + "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "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.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "missing-parameter": { "default": "Warning", "description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -1822,6 +2033,21 @@ ], "type": "string" }, + "name-style-check": { + "default": "Warning", + "description": "Enable diagnostics for name style.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "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.", @@ -2558,6 +2784,29 @@ "scope": "resource", "type": "array" }, + "nameStyle": { + "properties": { + "config": { + "$ref": "#/properties/nameStyle.config" + } + } + }, + "nameStyle.config": { + "additionalProperties": false, + "default": {}, + "markdownDescription": "Set name style config", + "patternProperties": { + ".*": { + "type": [ + "string", + "array" + ] + } + }, + "scope": "resource", + "title": "config", + "type": "object" + }, "runtime": { "properties": { "builtin": { @@ -2601,7 +2850,7 @@ "properties": { "basic": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2611,7 +2860,7 @@ }, "bit": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2621,7 +2870,7 @@ }, "bit32": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2631,7 +2880,7 @@ }, "builtin": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2641,7 +2890,7 @@ }, "coroutine": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2651,7 +2900,7 @@ }, "debug": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2661,7 +2910,7 @@ }, "ffi": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2671,7 +2920,7 @@ }, "io": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2681,7 +2930,27 @@ }, "jit": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, + "jit.profile": { + "default": "default", + "description": "TODO: Needs documentation", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, + "jit.util": { + "default": "default", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2691,7 +2960,7 @@ }, "math": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2701,7 +2970,7 @@ }, "os": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2711,7 +2980,7 @@ }, "package": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2721,7 +2990,7 @@ }, "string": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2731,7 +3000,7 @@ }, "string.buffer": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2741,7 +3010,7 @@ }, "table": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2751,7 +3020,7 @@ }, "table.clear": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2761,7 +3030,7 @@ }, "table.new": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2771,7 +3040,7 @@ }, "utf8": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2794,10 +3063,10 @@ ], "markdownDescription": "File encoding. The `ansi` option is only available under the `Windows` platform.", "markdownEnumDescriptions": [ - "", - "", - "", - "" + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation" ], "scope": "resource", "type": "string" @@ -2858,7 +3127,7 @@ }, "runtime.plugin": { "default": "", - "markdownDescription": "Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more.", + "markdownDescription": "Plugin path. Please read [wiki](https://luals.github.io/wiki/plugins) to learn more.", "scope": "resource", "type": "string" }, @@ -2917,11 +3186,11 @@ ], "markdownDescription": "Lua runtime version.", "markdownEnumDescriptions": [ - "", - "", - "", - "", - "" + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation" ], "scope": "resource", "type": "string" @@ -3108,10 +3377,12 @@ } }, "workspace.checkThirdParty": { - "default": true, "markdownDescription": "Automatic detection and adaptation of third-party libraries, currently supported libraries are:\n\n* OpenResty\n* Cocos4.0\n* LÖVE\n* LÖVR\n* skynet\n* Jass\n", "scope": "resource", - "type": "boolean" + "type": [ + "string", + "boolean" + ] }, "workspace.ignoreDir": { "default": [ diff --git a/setting/schema-zh-cn.json b/setting/schema-zh-cn.json index f7dd56adf44b8954b9b4f00cfed1f89d0cb14bf7..2cded4dbc458ab4c605bc76cd8a5ac7d8aed3a34 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" }, @@ -238,8 +238,11 @@ "err-nonstandard-symbol", "err-then-as-do", "exp-in-action", + "global-element", "global-in-nil-env", + "incomplete-signature-doc", "index-in-func-name", + "inject-field", "invisible", "jump-local-scope", "keyword", @@ -283,9 +286,13 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", + "missing-global-doc", + "missing-local-export-doc", "missing-parameter", "missing-return", "missing-return-value", + "name-style-check", "need-check-nil", "need-paren", "nesting-long-mark", @@ -389,7 +396,18 @@ }, "codestyle": { "default": "Fallback", - "description": "* codestyle-check\n* spell-check", + "description": "* codestyle-check\n* name-style-check\n* spell-check", + "enum": [ + "Any", + "Opened", + "None", + "Fallback" + ], + "type": "string" + }, + "conventions": { + "default": "Fallback", + "description": "* global-element", "enum": [ "Any", "Opened", @@ -422,7 +440,7 @@ }, "luadoc": { "default": "Fallback", - "description": "* 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", + "description": "* 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", "enum": [ "Any", "Opened", @@ -466,7 +484,7 @@ }, "type-check": { "default": "Fallback", - "description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", + "description": "* 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", "enum": [ "Any", "Opened", @@ -477,7 +495,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* 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", "enum": [ "Any", "Opened", @@ -532,7 +550,19 @@ }, "codestyle": { "default": "Fallback", - "description": "* codestyle-check\n* spell-check", + "description": "* codestyle-check\n* name-style-check\n* spell-check", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Fallback" + ], + "type": "string" + }, + "conventions": { + "default": "Fallback", + "description": "* global-element", "enum": [ "Error", "Warning", @@ -568,7 +598,7 @@ }, "luadoc": { "default": "Fallback", - "description": "* 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", + "description": "* 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", "enum": [ "Error", "Warning", @@ -616,7 +646,7 @@ }, "type-check": { "default": "Fallback", - "description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", + "description": "* 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", "enum": [ "Error", "Warning", @@ -628,7 +658,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* 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", "enum": [ "Error", "Warning", @@ -723,7 +753,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", @@ -736,7 +766,7 @@ }, "await-in-sync": { "default": "None", - "description": "Enable diagnostics for calls of asynchronous functions within a synchronous function.", + "description": "同步函数中异步函数调用", "enum": [ "Any", "Opened", @@ -749,7 +779,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", @@ -762,7 +792,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", @@ -775,7 +805,7 @@ }, "circle-doc-class": { "default": "Any", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "Any", "Opened", @@ -801,7 +831,7 @@ }, "code-after-break": { "default": "Opened", - "description": "Enable diagnostics for code placed after a break statement in a loop.", + "description": "放在循环中break语句后面的代码", "enum": [ "Any", "Opened", @@ -827,7 +857,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", @@ -840,7 +870,7 @@ }, "deprecated": { "default": "Any", - "description": "Enable diagnostics to highlight deprecated API.", + "description": "变量已被标记为deprecated(过时)但仍在使用", "enum": [ "Any", "Opened", @@ -853,7 +883,7 @@ }, "different-requires": { "default": "Any", - "description": "Enable diagnostics for files which are required by two different paths.", + "description": "required的同一个文件使用了两个不同的名字", "enum": [ "Any", "Opened", @@ -866,7 +896,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", @@ -879,7 +909,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", @@ -892,7 +922,7 @@ }, "duplicate-doc-alias": { "default": "Any", - "description": "Enable diagnostics for a duplicated alias annotation name.", + "description": "`@alias`字段的名字冲突", "enum": [ "Any", "Opened", @@ -905,7 +935,7 @@ }, "duplicate-doc-field": { "default": "Any", - "description": "Enable diagnostics for a duplicated field annotation name.", + "description": "`@field`字段的名字冲突", "enum": [ "Any", "Opened", @@ -918,7 +948,7 @@ }, "duplicate-doc-param": { "default": "Any", - "description": "Enable diagnostics for a duplicated param annotation name.", + "description": "`@param`字段的名字冲突", "enum": [ "Any", "Opened", @@ -944,7 +974,7 @@ }, "duplicate-set-field": { "default": "Opened", - "description": "Enable diagnostics for setting the same field in a class more than once.", + "description": "在一个类中多次定义同一字段", "enum": [ "Any", "Opened", @@ -968,6 +998,19 @@ ], "type": "string" }, + "global-element": { + "default": "None", + "description": "Enable diagnostics to warn about global elements.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Any", "description": "不能使用全局变量( `_ENV` 被设置为了 `nil`)", @@ -981,9 +1024,35 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "None", + "description": "`@param`或`@return`的注释不完整", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "inject-field": { + "default": "Opened", + "description": "TODO: Needs documentation", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "invisible": { "default": "Any", - "description": "Enable diagnostics for accesses to fields which are invisible.", + "description": "使用不可见的值", "enum": [ "Any", "Opened", @@ -1007,9 +1076,48 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "TODO: Needs documentation", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "None", + "description": "全局变量的注释缺失(全局函数必须为所有参数和返回值提供注释和注释)", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "missing-local-export-doc": { + "default": "None", + "description": "导出的本地函数缺少注释(导出的本地函数必须有包括本身以及所有参数和返回值的注释)", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "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", @@ -1022,7 +1130,7 @@ }, "missing-return": { "default": "Any", - "description": "Enable diagnostics for functions with return annotations which have no return statement.", + "description": "函数带有返回注释而无返回语句", "enum": [ "Any", "Opened", @@ -1035,7 +1143,20 @@ }, "missing-return-value": { "default": "Any", - "description": "Enable diagnostics for return statements without values although the containing function declares returns.", + "description": "函数无值返回但函数使用`@return`标记了返回值", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "name-style-check": { + "default": "None", + "description": "变量的名称样式检查", "enum": [ "Any", "Opened", @@ -1048,7 +1169,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", @@ -1087,7 +1208,7 @@ }, "no-unknown": { "default": "None", - "description": "Enable diagnostics for cases in which the type cannot be inferred.", + "description": "变量的未知类型无法推断", "enum": [ "Any", "Opened", @@ -1100,7 +1221,7 @@ }, "not-yieldable": { "default": "None", - "description": "Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.", + "description": "不允许调用 `coroutine.yield()` ", "enum": [ "Any", "Opened", @@ -1113,7 +1234,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", @@ -1152,7 +1273,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", @@ -1165,7 +1286,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", @@ -1191,7 +1312,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", @@ -1230,7 +1351,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", @@ -1243,7 +1364,7 @@ }, "undefined-doc-class": { "default": "Any", - "description": "Enable diagnostics for class annotations in which an undefined class is referenced.", + "description": "在`@class`注解中引用未定义的类。", "enum": [ "Any", "Opened", @@ -1256,7 +1377,7 @@ }, "undefined-doc-name": { "default": "Any", - "description": "Enable diagnostics for type annotations referencing an undefined type or alias.", + "description": "在`@type`注解中引用未定义的类型或`@alias`", "enum": [ "Any", "Opened", @@ -1269,7 +1390,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", @@ -1295,7 +1416,7 @@ }, "undefined-field": { "default": "Opened", - "description": "Enable diagnostics for cases in which an undefined field of a variable is read.", + "description": "引用变量的未定义字段", "enum": [ "Any", "Opened", @@ -1321,7 +1442,7 @@ }, "unknown-cast-variable": { "default": "Any", - "description": "Enable diagnostics for casts of undefined variables.", + "description": "使用`@cast`对未定义变量的强制转换", "enum": [ "Any", "Opened", @@ -1334,7 +1455,7 @@ }, "unknown-diag-code": { "default": "Any", - "description": "Enable diagnostics in cases in which an unknown diagnostics code is entered.", + "description": "未知的诊断代码", "enum": [ "Any", "Opened", @@ -1347,7 +1468,7 @@ }, "unknown-operator": { "default": "Any", - "description": "Enable diagnostics for unknown operators.", + "description": "未知的运算符", "enum": [ "Any", "Opened", @@ -1360,7 +1481,7 @@ }, "unreachable-code": { "default": "Opened", - "description": "Enable diagnostics for unreachable code.", + "description": "不可达的代码", "enum": [ "Any", "Opened", @@ -1449,7 +1570,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", @@ -1464,7 +1585,7 @@ }, "await-in-sync": { "default": "Warning", - "description": "Enable diagnostics for calls of asynchronous functions within a synchronous function.", + "description": "同步函数中异步函数调用", "enum": [ "Error", "Warning", @@ -1479,7 +1600,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", @@ -1494,7 +1615,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", @@ -1509,7 +1630,7 @@ }, "circle-doc-class": { "default": "Warning", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "Error", "Warning", @@ -1539,7 +1660,7 @@ }, "code-after-break": { "default": "Hint", - "description": "Enable diagnostics for code placed after a break statement in a loop.", + "description": "放在循环中break语句后面的代码", "enum": [ "Error", "Warning", @@ -1569,7 +1690,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", @@ -1584,7 +1705,7 @@ }, "deprecated": { "default": "Warning", - "description": "Enable diagnostics to highlight deprecated API.", + "description": "变量已被标记为deprecated(过时)但仍在使用", "enum": [ "Error", "Warning", @@ -1599,7 +1720,7 @@ }, "different-requires": { "default": "Warning", - "description": "Enable diagnostics for files which are required by two different paths.", + "description": "required的同一个文件使用了两个不同的名字", "enum": [ "Error", "Warning", @@ -1614,7 +1735,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", @@ -1629,7 +1750,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", @@ -1644,7 +1765,7 @@ }, "duplicate-doc-alias": { "default": "Warning", - "description": "Enable diagnostics for a duplicated alias annotation name.", + "description": "`@alias`字段的名字冲突", "enum": [ "Error", "Warning", @@ -1659,7 +1780,7 @@ }, "duplicate-doc-field": { "default": "Warning", - "description": "Enable diagnostics for a duplicated field annotation name.", + "description": "`@field`字段的名字冲突", "enum": [ "Error", "Warning", @@ -1674,7 +1795,7 @@ }, "duplicate-doc-param": { "default": "Warning", - "description": "Enable diagnostics for a duplicated param annotation name.", + "description": "`@param`字段的名字冲突", "enum": [ "Error", "Warning", @@ -1704,7 +1825,7 @@ }, "duplicate-set-field": { "default": "Warning", - "description": "Enable diagnostics for setting the same field in a class more than once.", + "description": "在一个类中多次定义同一字段", "enum": [ "Error", "Warning", @@ -1732,6 +1853,21 @@ ], "type": "string" }, + "global-element": { + "default": "Warning", + "description": "Enable diagnostics to warn about global elements.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Warning", "description": "不能使用全局变量( `_ENV` 被设置为了 `nil`)", @@ -1747,9 +1883,39 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "Warning", + "description": "`@param`或`@return`的注释不完整", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "inject-field": { + "default": "Warning", + "description": "TODO: Needs documentation", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "invisible": { "default": "Warning", - "description": "Enable diagnostics for accesses to fields which are invisible.", + "description": "使用不可见的值", "enum": [ "Error", "Warning", @@ -1777,9 +1943,54 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "TODO: Needs documentation", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "Warning", + "description": "全局变量的注释缺失(全局函数必须为所有参数和返回值提供注释和注释)", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "missing-local-export-doc": { + "default": "Warning", + "description": "导出的本地函数缺少注释(导出的本地函数必须有包括本身以及所有参数和返回值的注释)", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "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", @@ -1794,7 +2005,7 @@ }, "missing-return": { "default": "Warning", - "description": "Enable diagnostics for functions with return annotations which have no return statement.", + "description": "函数带有返回注释而无返回语句", "enum": [ "Error", "Warning", @@ -1809,7 +2020,22 @@ }, "missing-return-value": { "default": "Warning", - "description": "Enable diagnostics for return statements without values although the containing function declares returns.", + "description": "函数无值返回但函数使用`@return`标记了返回值", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "name-style-check": { + "default": "Warning", + "description": "变量的名称样式检查", "enum": [ "Error", "Warning", @@ -1824,7 +2050,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", @@ -1869,7 +2095,7 @@ }, "no-unknown": { "default": "Warning", - "description": "Enable diagnostics for cases in which the type cannot be inferred.", + "description": "变量的未知类型无法推断", "enum": [ "Error", "Warning", @@ -1884,7 +2110,7 @@ }, "not-yieldable": { "default": "Warning", - "description": "Enable diagnostics for calls to `coroutine.yield()` when it is not permitted.", + "description": "不允许调用 `coroutine.yield()` ", "enum": [ "Error", "Warning", @@ -1899,7 +2125,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", @@ -1944,7 +2170,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", @@ -1959,7 +2185,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", @@ -1989,7 +2215,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", @@ -2034,7 +2260,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", @@ -2049,7 +2275,7 @@ }, "undefined-doc-class": { "default": "Warning", - "description": "Enable diagnostics for class annotations in which an undefined class is referenced.", + "description": "在`@class`注解中引用未定义的类。", "enum": [ "Error", "Warning", @@ -2064,7 +2290,7 @@ }, "undefined-doc-name": { "default": "Warning", - "description": "Enable diagnostics for type annotations referencing an undefined type or alias.", + "description": "在`@type`注解中引用未定义的类型或`@alias`", "enum": [ "Error", "Warning", @@ -2079,7 +2305,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", @@ -2109,7 +2335,7 @@ }, "undefined-field": { "default": "Warning", - "description": "Enable diagnostics for cases in which an undefined field of a variable is read.", + "description": "引用变量的未定义字段", "enum": [ "Error", "Warning", @@ -2139,7 +2365,7 @@ }, "unknown-cast-variable": { "default": "Warning", - "description": "Enable diagnostics for casts of undefined variables.", + "description": "使用`@cast`对未定义变量的强制转换", "enum": [ "Error", "Warning", @@ -2154,7 +2380,7 @@ }, "unknown-diag-code": { "default": "Warning", - "description": "Enable diagnostics in cases in which an unknown diagnostics code is entered.", + "description": "未知的诊断代码", "enum": [ "Error", "Warning", @@ -2169,7 +2395,7 @@ }, "unknown-operator": { "default": "Warning", - "description": "Enable diagnostics for unknown operators.", + "description": "未知的运算符", "enum": [ "Error", "Warning", @@ -2184,7 +2410,7 @@ }, "unreachable-code": { "default": "Hint", - "description": "Enable diagnostics for unreachable code.", + "description": "不可达的代码", "enum": [ "Error", "Warning", @@ -2554,10 +2780,33 @@ "items": { "type": "string" }, - "markdownDescription": "VSCode中启动语言服务时的[命令行参数](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#arguments)。", + "markdownDescription": "VSCode中启动语言服务时的[命令行参数](https://luals.github.io/wiki/usage#arguments)。", "scope": "resource", "type": "array" }, + "nameStyle": { + "properties": { + "config": { + "$ref": "#/properties/nameStyle.config" + } + } + }, + "nameStyle.config": { + "additionalProperties": false, + "default": {}, + "markdownDescription": "设定命名风格检查的配置", + "patternProperties": { + ".*": { + "type": [ + "string", + "array" + ] + } + }, + "scope": "resource", + "title": "config", + "type": "object" + }, "runtime": { "properties": { "builtin": { @@ -2601,7 +2850,7 @@ "properties": { "basic": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2611,7 +2860,7 @@ }, "bit": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2621,7 +2870,7 @@ }, "bit32": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2631,7 +2880,7 @@ }, "builtin": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2641,7 +2890,7 @@ }, "coroutine": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2651,7 +2900,7 @@ }, "debug": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2661,7 +2910,7 @@ }, "ffi": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2671,7 +2920,7 @@ }, "io": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2681,7 +2930,27 @@ }, "jit": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, + "jit.profile": { + "default": "default", + "description": "TODO: Needs documentation", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, + "jit.util": { + "default": "default", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2691,7 +2960,7 @@ }, "math": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2701,7 +2970,7 @@ }, "os": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2711,7 +2980,7 @@ }, "package": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2721,7 +2990,7 @@ }, "string": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2731,7 +3000,7 @@ }, "string.buffer": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2741,7 +3010,7 @@ }, "table": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2751,7 +3020,7 @@ }, "table.clear": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2761,7 +3030,7 @@ }, "table.new": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2771,7 +3040,7 @@ }, "utf8": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2794,10 +3063,10 @@ ], "markdownDescription": "文件编码,`ansi` 选项只在 `Windows` 平台下有效。", "markdownEnumDescriptions": [ - "", - "", - "", - "" + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation" ], "scope": "resource", "type": "string" @@ -2858,7 +3127,7 @@ }, "runtime.plugin": { "default": "", - "markdownDescription": "插件路径,请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/Plugins)了解用法。", + "markdownDescription": "插件路径,请查阅[文档](https://luals.github.io/wiki/plugins)了解用法。", "scope": "resource", "type": "string" }, @@ -2917,11 +3186,11 @@ ], "markdownDescription": "Lua运行版本。", "markdownEnumDescriptions": [ - "", - "", - "", - "", - "" + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation" ], "scope": "resource", "type": "string" @@ -3035,21 +3304,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" } }, @@ -3108,10 +3377,12 @@ } }, "workspace.checkThirdParty": { - "default": true, "markdownDescription": "自动检测与适配第三方库,目前支持的库为:\n\n* OpenResty\n* Cocos4.0\n* LÖVE\n* LÖVR\n* skynet\n* Jass\n", "scope": "resource", - "type": "boolean" + "type": [ + "string", + "boolean" + ] }, "workspace.ignoreDir": { "default": [ diff --git a/setting/schema-zh-tw.json b/setting/schema-zh-tw.json index 86a7c3369087b51b9dfcaf7da966f3105e7c2656..f292ec64bb81cc2f8bdfade51bb40f222709a879 100644 --- a/setting/schema-zh-tw.json +++ b/setting/schema-zh-tw.json @@ -238,8 +238,11 @@ "err-nonstandard-symbol", "err-then-as-do", "exp-in-action", + "global-element", "global-in-nil-env", + "incomplete-signature-doc", "index-in-func-name", + "inject-field", "invisible", "jump-local-scope", "keyword", @@ -283,9 +286,13 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", + "missing-global-doc", + "missing-local-export-doc", "missing-parameter", "missing-return", "missing-return-value", + "name-style-check", "need-check-nil", "need-paren", "nesting-long-mark", @@ -389,7 +396,18 @@ }, "codestyle": { "default": "Fallback", - "description": "* codestyle-check\n* spell-check", + "description": "* codestyle-check\n* name-style-check\n* spell-check", + "enum": [ + "Any", + "Opened", + "None", + "Fallback" + ], + "type": "string" + }, + "conventions": { + "default": "Fallback", + "description": "* global-element", "enum": [ "Any", "Opened", @@ -422,7 +440,7 @@ }, "luadoc": { "default": "Fallback", - "description": "* 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", + "description": "* 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", "enum": [ "Any", "Opened", @@ -466,7 +484,7 @@ }, "type-check": { "default": "Fallback", - "description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", + "description": "* 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", "enum": [ "Any", "Opened", @@ -477,7 +495,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* 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", "enum": [ "Any", "Opened", @@ -532,7 +550,19 @@ }, "codestyle": { "default": "Fallback", - "description": "* codestyle-check\n* spell-check", + "description": "* codestyle-check\n* name-style-check\n* spell-check", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Fallback" + ], + "type": "string" + }, + "conventions": { + "default": "Fallback", + "description": "* global-element", "enum": [ "Error", "Warning", @@ -568,7 +598,7 @@ }, "luadoc": { "default": "Fallback", - "description": "* 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", + "description": "* 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", "enum": [ "Error", "Warning", @@ -616,7 +646,7 @@ }, "type-check": { "default": "Fallback", - "description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", + "description": "* 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", "enum": [ "Error", "Warning", @@ -628,7 +658,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* 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", "enum": [ "Error", "Warning", @@ -775,7 +805,7 @@ }, "circle-doc-class": { "default": "Any", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "Any", "Opened", @@ -968,6 +998,19 @@ ], "type": "string" }, + "global-element": { + "default": "None", + "description": "Enable diagnostics to warn about global elements.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Any", "description": "不能使用全域變數( `_ENV` 被設定為 `nil`)", @@ -981,6 +1024,32 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "None", + "description": "Incomplete @param or @return annotations for functions.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "inject-field": { + "default": "Opened", + "description": "TODO: Needs documentation", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "invisible": { "default": "Any", "description": "Enable diagnostics for accesses to fields which are invisible.", @@ -1007,6 +1076,45 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "TODO: Needs documentation", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "None", + "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "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.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "missing-parameter": { "default": "Any", "description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -1046,6 +1154,19 @@ ], "type": "string" }, + "name-style-check": { + "default": "None", + "description": "Enable diagnostics for name style.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "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.", @@ -1509,7 +1630,7 @@ }, "circle-doc-class": { "default": "Warning", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "Error", "Warning", @@ -1732,6 +1853,21 @@ ], "type": "string" }, + "global-element": { + "default": "Warning", + "description": "Enable diagnostics to warn about global elements.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Warning", "description": "不能使用全域變數( `_ENV` 被設定為 `nil`)", @@ -1747,6 +1883,36 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "Warning", + "description": "Incomplete @param or @return annotations for functions.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "inject-field": { + "default": "Warning", + "description": "TODO: Needs documentation", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "invisible": { "default": "Warning", "description": "Enable diagnostics for accesses to fields which are invisible.", @@ -1777,6 +1943,51 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "TODO: Needs documentation", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "Warning", + "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "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.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "missing-parameter": { "default": "Warning", "description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -1822,6 +2033,21 @@ ], "type": "string" }, + "name-style-check": { + "default": "Warning", + "description": "Enable diagnostics for name style.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "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.", @@ -2554,10 +2780,33 @@ "items": { "type": "string" }, - "markdownDescription": "VSCode中啟動語言伺服時的[命令列參數](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#arguments)。", + "markdownDescription": "VSCode中啟動語言伺服時的[命令列參數](https://luals.github.io/wiki/usage#arguments)。", "scope": "resource", "type": "array" }, + "nameStyle": { + "properties": { + "config": { + "$ref": "#/properties/nameStyle.config" + } + } + }, + "nameStyle.config": { + "additionalProperties": false, + "default": {}, + "markdownDescription": "Set name style config", + "patternProperties": { + ".*": { + "type": [ + "string", + "array" + ] + } + }, + "scope": "resource", + "title": "config", + "type": "object" + }, "runtime": { "properties": { "builtin": { @@ -2601,7 +2850,7 @@ "properties": { "basic": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2611,7 +2860,7 @@ }, "bit": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2621,7 +2870,7 @@ }, "bit32": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2631,7 +2880,7 @@ }, "builtin": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2641,7 +2890,7 @@ }, "coroutine": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2651,7 +2900,7 @@ }, "debug": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2661,7 +2910,7 @@ }, "ffi": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2671,7 +2920,7 @@ }, "io": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2681,7 +2930,27 @@ }, "jit": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, + "jit.profile": { + "default": "default", + "description": "TODO: Needs documentation", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, + "jit.util": { + "default": "default", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2691,7 +2960,7 @@ }, "math": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2701,7 +2970,7 @@ }, "os": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2711,7 +2980,7 @@ }, "package": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2721,7 +2990,7 @@ }, "string": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2731,7 +3000,7 @@ }, "string.buffer": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2741,7 +3010,7 @@ }, "table": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2751,7 +3020,7 @@ }, "table.clear": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2761,7 +3030,7 @@ }, "table.new": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2771,7 +3040,7 @@ }, "utf8": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2794,10 +3063,10 @@ ], "markdownDescription": "檔案編碼,選項 `ansi` 只在 `Windows` 平台下有效。", "markdownEnumDescriptions": [ - "", - "", - "", - "" + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation" ], "scope": "resource", "type": "string" @@ -2858,7 +3127,7 @@ }, "runtime.plugin": { "default": "", - "markdownDescription": "延伸模組路徑,請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/Plugins)瞭解用法。", + "markdownDescription": "延伸模組路徑,請查閱[文件](https://luals.github.io/wiki/plugins)瞭解用法。", "scope": "resource", "type": "string" }, @@ -2917,11 +3186,11 @@ ], "markdownDescription": "Lua執行版本。", "markdownEnumDescriptions": [ - "", - "", - "", - "", - "" + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation" ], "scope": "resource", "type": "string" @@ -3108,10 +3377,12 @@ } }, "workspace.checkThirdParty": { - "default": true, "markdownDescription": "自動偵測與適應第三方庫,目前支援的庫為:\n\n* OpenResty\n* Cocos4.0\n* LÖVE\n* LÖVR\n* skynet\n* Jass\n", "scope": "resource", - "type": "boolean" + "type": [ + "string", + "boolean" + ] }, "workspace.ignoreDir": { "default": [ diff --git a/setting/schema.json b/setting/schema.json index ff7aeb07211263bf822afd2d88b131710be3a9b2..d56613a2f10460629f267409befbd31ba2e3d8c2 100644 --- a/setting/schema.json +++ b/setting/schema.json @@ -238,8 +238,11 @@ "err-nonstandard-symbol", "err-then-as-do", "exp-in-action", + "global-element", "global-in-nil-env", + "incomplete-signature-doc", "index-in-func-name", + "inject-field", "invisible", "jump-local-scope", "keyword", @@ -283,9 +286,13 @@ "miss-sep-in-table", "miss-space-between", "miss-symbol", + "missing-fields", + "missing-global-doc", + "missing-local-export-doc", "missing-parameter", "missing-return", "missing-return-value", + "name-style-check", "need-check-nil", "need-paren", "nesting-long-mark", @@ -389,7 +396,18 @@ }, "codestyle": { "default": "Fallback", - "description": "* codestyle-check\n* spell-check", + "description": "* codestyle-check\n* name-style-check\n* spell-check", + "enum": [ + "Any", + "Opened", + "None", + "Fallback" + ], + "type": "string" + }, + "conventions": { + "default": "Fallback", + "description": "* global-element", "enum": [ "Any", "Opened", @@ -422,7 +440,7 @@ }, "luadoc": { "default": "Fallback", - "description": "* 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", + "description": "* 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", "enum": [ "Any", "Opened", @@ -466,7 +484,7 @@ }, "type-check": { "default": "Fallback", - "description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", + "description": "* 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", "enum": [ "Any", "Opened", @@ -477,7 +495,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* 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", "enum": [ "Any", "Opened", @@ -532,7 +550,19 @@ }, "codestyle": { "default": "Fallback", - "description": "* codestyle-check\n* spell-check", + "description": "* codestyle-check\n* name-style-check\n* spell-check", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Fallback" + ], + "type": "string" + }, + "conventions": { + "default": "Fallback", + "description": "* global-element", "enum": [ "Error", "Warning", @@ -568,7 +598,7 @@ }, "luadoc": { "default": "Fallback", - "description": "* 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", + "description": "* 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", "enum": [ "Error", "Warning", @@ -616,7 +646,7 @@ }, "type-check": { "default": "Fallback", - "description": "* assign-type-mismatch\n* cast-local-type\n* cast-type-mismatch\n* need-check-nil\n* param-type-mismatch\n* return-type-mismatch\n* undefined-field", + "description": "* 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", "enum": [ "Error", "Warning", @@ -628,7 +658,7 @@ }, "unbalanced": { "default": "Fallback", - "description": "* missing-parameter\n* missing-return\n* missing-return-value\n* redundant-parameter\n* redundant-return-value\n* redundant-value\n* unbalanced-assignments", + "description": "* 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", "enum": [ "Error", "Warning", @@ -775,7 +805,7 @@ }, "circle-doc-class": { "default": "Any", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "Any", "Opened", @@ -968,6 +998,19 @@ ], "type": "string" }, + "global-element": { + "default": "None", + "description": "Enable diagnostics to warn about global elements.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Any", "description": "Enable cannot use global variables ( `_ENV` is set to `nil`) diagnostics.", @@ -981,6 +1024,32 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "None", + "description": "Incomplete @param or @return annotations for functions.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "inject-field": { + "default": "Opened", + "description": "TODO: Needs documentation", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "invisible": { "default": "Any", "description": "Enable diagnostics for accesses to fields which are invisible.", @@ -1007,6 +1076,45 @@ ], "type": "string" }, + "missing-fields": { + "default": "Any", + "description": "TODO: Needs documentation", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "None", + "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, + "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.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "missing-parameter": { "default": "Any", "description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -1046,6 +1154,19 @@ ], "type": "string" }, + "name-style-check": { + "default": "None", + "description": "Enable diagnostics for name style.", + "enum": [ + "Any", + "Opened", + "None", + "Any!", + "Opened!", + "None!" + ], + "type": "string" + }, "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.", @@ -1509,7 +1630,7 @@ }, "circle-doc-class": { "default": "Warning", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "Error", "Warning", @@ -1732,6 +1853,21 @@ ], "type": "string" }, + "global-element": { + "default": "Warning", + "description": "Enable diagnostics to warn about global elements.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "global-in-nil-env": { "default": "Warning", "description": "Enable cannot use global variables ( `_ENV` is set to `nil`) diagnostics.", @@ -1747,6 +1883,36 @@ ], "type": "string" }, + "incomplete-signature-doc": { + "default": "Warning", + "description": "Incomplete @param or @return annotations for functions.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "inject-field": { + "default": "Warning", + "description": "TODO: Needs documentation", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "invisible": { "default": "Warning", "description": "Enable diagnostics for accesses to fields which are invisible.", @@ -1777,6 +1943,51 @@ ], "type": "string" }, + "missing-fields": { + "default": "Warning", + "description": "TODO: Needs documentation", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "missing-global-doc": { + "default": "Warning", + "description": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, + "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.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "missing-parameter": { "default": "Warning", "description": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.", @@ -1822,6 +2033,21 @@ ], "type": "string" }, + "name-style-check": { + "default": "Warning", + "description": "Enable diagnostics for name style.", + "enum": [ + "Error", + "Warning", + "Information", + "Hint", + "Error!", + "Warning!", + "Information!", + "Hint!" + ], + "type": "string" + }, "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.", @@ -2558,6 +2784,29 @@ "scope": "resource", "type": "array" }, + "nameStyle": { + "properties": { + "config": { + "$ref": "#/properties/nameStyle.config" + } + } + }, + "nameStyle.config": { + "additionalProperties": false, + "default": {}, + "markdownDescription": "Set name style config", + "patternProperties": { + ".*": { + "type": [ + "string", + "array" + ] + } + }, + "scope": "resource", + "title": "config", + "type": "object" + }, "runtime": { "properties": { "builtin": { @@ -2601,7 +2850,7 @@ "properties": { "basic": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2611,7 +2860,7 @@ }, "bit": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2621,7 +2870,7 @@ }, "bit32": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2631,7 +2880,7 @@ }, "builtin": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2641,7 +2890,7 @@ }, "coroutine": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2651,7 +2900,7 @@ }, "debug": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2661,7 +2910,7 @@ }, "ffi": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2671,7 +2920,7 @@ }, "io": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2681,7 +2930,27 @@ }, "jit": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, + "jit.profile": { + "default": "default", + "description": "TODO: Needs documentation", + "enum": [ + "default", + "enable", + "disable" + ], + "type": "string" + }, + "jit.util": { + "default": "default", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2691,7 +2960,7 @@ }, "math": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2701,7 +2970,7 @@ }, "os": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2711,7 +2980,7 @@ }, "package": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2721,7 +2990,7 @@ }, "string": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2731,7 +3000,7 @@ }, "string.buffer": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2741,7 +3010,7 @@ }, "table": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2751,7 +3020,7 @@ }, "table.clear": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2761,7 +3030,7 @@ }, "table.new": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2771,7 +3040,7 @@ }, "utf8": { "default": "default", - "description": "", + "description": "TODO: Needs documentation", "enum": [ "default", "enable", @@ -2794,10 +3063,10 @@ ], "markdownDescription": "File encoding. The `ansi` option is only available under the `Windows` platform.", "markdownEnumDescriptions": [ - "", - "", - "", - "" + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation" ], "scope": "resource", "type": "string" @@ -2858,7 +3127,7 @@ }, "runtime.plugin": { "default": "", - "markdownDescription": "Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more.", + "markdownDescription": "Plugin path. Please read [wiki](https://luals.github.io/wiki/plugins) to learn more.", "scope": "resource", "type": "string" }, @@ -2917,11 +3186,11 @@ ], "markdownDescription": "Lua runtime version.", "markdownEnumDescriptions": [ - "", - "", - "", - "", - "" + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation", + "TODO: Needs documentation" ], "scope": "resource", "type": "string" @@ -3108,10 +3377,12 @@ } }, "workspace.checkThirdParty": { - "default": true, "markdownDescription": "Automatic detection and adaptation of third-party libraries, currently supported libraries are:\n\n* OpenResty\n* Cocos4.0\n* LÖVE\n* LÖVR\n* skynet\n* Jass\n", "scope": "resource", - "type": "boolean" + "type": [ + "string", + "boolean" + ] }, "workspace.ignoreDir": { "default": [