Skip to content

Commit 249fd62

Browse files
committed
3.6.19
1 parent 4b25f3d commit 249fd62

14 files changed

+611
-40
lines changed

.vscode/settings.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@
22
"Lua.runtime.version": "Lua 5.4",
33
"Lua.workspace.library": {
44
"server/script-beta": true
5-
}
5+
},
6+
"Lua.workspace.checkThirdParty": false
67
}

README.md

+13-24
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ The Lua language server provides various language features for Lua to make devel
1212

1313
## Features
1414

15+
- ⚙️ Supports `Lua 5.4`, `Lua 5.3`, `Lua 5.2`, `Lua 5.1`, and `LuaJIT`
1516
- 📄 Over 20 supported [annotations](https://github.com/LuaLS/lua-language-server/wiki/Annotations) for documenting your code
1617
- ↪ Go to definition
1718
- 🦺 Dynamic [type checking](https://github.com/LuaLS/lua-language-server/wiki/Type-Checking)
@@ -28,29 +29,29 @@ The Lua language server provides various language features for Lua to make devel
2829
- 📖 [Documentation Generation](https://github.com/LuaLS/lua-language-server/wiki/Export-Documentation)
2930

3031
## Install
31-
32-
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.
32+
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 be configured using a [configuration file](https://github.com/LuaLS/lua-language-server/wiki/Configuration-File). For a more detailed intro, check out the [getting started page in the wiki](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started).
3333

3434
### Visual Studio Code
3535
[![Install in VS Code](https://img.shields.io/badge/VS%20Code-Install-blue?style=for-the-badge&logo=visualstudiocode "Install in VS Code")](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
3636

3737
The language server and Visual Studio Code client can be installed from [the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sumneko.lua).
3838

39-
![](https://github.com/LuaLS/vscode-lua/raw/master/images//Install%20In%20VSCode.gif)
39+
### NeoVim
40+
[![Install for NeoVim](https://img.shields.io/badge/NeoVim-Install-blue?style=for-the-badge&logo=neovim "Install for NeoVim")](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lua_ls)
41+
42+
View the installation instructions for NeoVim in the [nvim-lspconfig repo](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#lua_ls).
43+
44+
For a guide to getting started from scratch using Mason, read [Heiker's guide](https://dev.to/vonheikemen/getting-started-with-neovims-native-lsp-client-in-the-year-of-2022-the-easy-way-bp3).
4045

4146
### Command Line
4247
[![Install for command line](https://img.shields.io/badge/Command%20Line-Install-blue?style=for-the-badge&logo=windowsterminal "Install for command line")](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#command-line)
4348

44-
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/).
49+
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 [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/).
4550

46-
## Supported Lua Versions
47-
| Version | Supported |
48-
| :-----: | :------------: |
49-
| Lua 5.1 | ![][checkmark] |
50-
| Lua 5.2 | ![][checkmark] |
51-
| Lua 5.3 | ![][checkmark] |
52-
| Lua 5.4 | ![][checkmark] |
53-
| LuaJIT | ![][checkmark] |
51+
### Community Install Methods
52+
The install methods below are maintained by community members.
53+
54+
[asdf plugin](https://github.com/bellini666/asdf-lua-language-server)
5455

5556
## Links
5657
- [Changelog](https://github.com/LuaLS/lua-language-server/blob/master/changelog.md)
@@ -82,15 +83,6 @@ Are you able to [provide a translation](https://github.com/LuaLS/lua-language-se
8283

8384
Thank you to [all contributors of translations](https://github.com/LuaLS/lua-language-server/commits/master/locale)!
8485

85-
## Configuration
86-
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).
87-
88-
### Visual Studio Code
89-
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).
90-
91-
### Other
92-
See the [configuration file wiki page](https://github.com/LuaLS/lua-language-server/wiki/Configuration-File).
93-
9486

9587
## Privacy
9688
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.
@@ -116,6 +108,3 @@ Software that the language server (or the development of it) uses:
116108
* [json.lua](https://github.com/actboy168/json.lua)
117109
* [EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle)
118110
* [inspect.lua](https://github.com/kikito/inspect.lua)
119-
120-
121-
[checkmark]: https://user-images.githubusercontent.com/61925890/183228083-d3aa4eca-30c7-4b9f-aaab-26ce3d8a14fb.png

changelog.md

+15
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# changelog
22

3+
## 3.6.19
4+
`2023-4-26`
5+
* `FIX` commandline parameter `checklevel` may not work
6+
* `FIX` [#2036]
7+
* `FIX` [#2037]
8+
* `FIX` [#2056]
9+
* `FIX` [#2077]
10+
* `FIX` [#2081]
11+
12+
[#2036]: https://github.com/LuaLS/lua-language-server/issues/2036
13+
[#2037]: https://github.com/LuaLS/lua-language-server/issues/2037
14+
[#2056]: https://github.com/LuaLS/lua-language-server/issues/2056
15+
[#2077]: https://github.com/LuaLS/lua-language-server/issues/2077
16+
[#2081]: https://github.com/LuaLS/lua-language-server/issues/2081
17+
318
## 3.6.18
419
`2023-3-23`
520
* `FIX` [#1943]

package.json

+111-1
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@
177177
"err-nonstandard-symbol",
178178
"err-then-as-do",
179179
"exp-in-action",
180+
"global-element",
180181
"global-in-nil-env",
182+
"incomplete-signature-doc",
181183
"index-in-func-name",
182184
"invisible",
183185
"jump-local-scope",
@@ -222,6 +224,7 @@
222224
"miss-sep-in-table",
223225
"miss-space-between",
224226
"miss-symbol",
227+
"missing-global-doc",
225228
"missing-parameter",
226229
"missing-return",
227230
"missing-return-value",
@@ -337,6 +340,17 @@
337340
],
338341
"type": "string"
339342
},
343+
"conventions": {
344+
"default": "Fallback",
345+
"description": "%config.diagnostics.conventions%",
346+
"enum": [
347+
"Any",
348+
"Opened",
349+
"None",
350+
"Fallback"
351+
],
352+
"type": "string"
353+
},
340354
"duplicate": {
341355
"default": "Fallback",
342356
"description": "%config.diagnostics.duplicate%",
@@ -481,6 +495,18 @@
481495
],
482496
"type": "string"
483497
},
498+
"conventions": {
499+
"default": "Fallback",
500+
"description": "%config.diagnostics.conventions%",
501+
"enum": [
502+
"Error",
503+
"Warning",
504+
"Information",
505+
"Hint",
506+
"Fallback"
507+
],
508+
"type": "string"
509+
},
484510
"duplicate": {
485511
"default": "Fallback",
486512
"description": "%config.diagnostics.duplicate%",
@@ -890,6 +916,19 @@
890916
],
891917
"type": "string"
892918
},
919+
"global-element": {
920+
"default": "None",
921+
"description": "%config.diagnostics.global-element%",
922+
"enum": [
923+
"Any",
924+
"Opened",
925+
"None",
926+
"Any!",
927+
"Opened!",
928+
"None!"
929+
],
930+
"type": "string"
931+
},
893932
"global-in-nil-env": {
894933
"default": "Any",
895934
"description": "%config.diagnostics.global-in-nil-env%",
@@ -903,6 +942,19 @@
903942
],
904943
"type": "string"
905944
},
945+
"incomplete-signature-doc": {
946+
"default": "None",
947+
"description": "%config.diagnostics.incomplete-signature-doc%",
948+
"enum": [
949+
"Any",
950+
"Opened",
951+
"None",
952+
"Any!",
953+
"Opened!",
954+
"None!"
955+
],
956+
"type": "string"
957+
},
906958
"invisible": {
907959
"default": "Any",
908960
"description": "%config.diagnostics.invisible%",
@@ -929,6 +981,19 @@
929981
],
930982
"type": "string"
931983
},
984+
"missing-global-doc": {
985+
"default": "None",
986+
"description": "%config.diagnostics.missing-global-doc%",
987+
"enum": [
988+
"Any",
989+
"Opened",
990+
"None",
991+
"Any!",
992+
"Opened!",
993+
"None!"
994+
],
995+
"type": "string"
996+
},
932997
"missing-parameter": {
933998
"default": "Any",
934999
"description": "%config.diagnostics.missing-parameter%",
@@ -1654,6 +1719,21 @@
16541719
],
16551720
"type": "string"
16561721
},
1722+
"global-element": {
1723+
"default": "Warning",
1724+
"description": "%config.diagnostics.global-element%",
1725+
"enum": [
1726+
"Error",
1727+
"Warning",
1728+
"Information",
1729+
"Hint",
1730+
"Error!",
1731+
"Warning!",
1732+
"Information!",
1733+
"Hint!"
1734+
],
1735+
"type": "string"
1736+
},
16571737
"global-in-nil-env": {
16581738
"default": "Warning",
16591739
"description": "%config.diagnostics.global-in-nil-env%",
@@ -1669,6 +1749,21 @@
16691749
],
16701750
"type": "string"
16711751
},
1752+
"incomplete-signature-doc": {
1753+
"default": "Warning",
1754+
"description": "%config.diagnostics.incomplete-signature-doc%",
1755+
"enum": [
1756+
"Error",
1757+
"Warning",
1758+
"Information",
1759+
"Hint",
1760+
"Error!",
1761+
"Warning!",
1762+
"Information!",
1763+
"Hint!"
1764+
],
1765+
"type": "string"
1766+
},
16721767
"invisible": {
16731768
"default": "Warning",
16741769
"description": "%config.diagnostics.invisible%",
@@ -1699,6 +1794,21 @@
16991794
],
17001795
"type": "string"
17011796
},
1797+
"missing-global-doc": {
1798+
"default": "Warning",
1799+
"description": "%config.diagnostics.missing-global-doc%",
1800+
"enum": [
1801+
"Error",
1802+
"Warning",
1803+
"Information",
1804+
"Hint",
1805+
"Error!",
1806+
"Warning!",
1807+
"Information!",
1808+
"Hint!"
1809+
],
1810+
"type": "string"
1811+
},
17021812
"missing-parameter": {
17031813
"default": "Warning",
17041814
"description": "%config.diagnostics.missing-parameter%",
@@ -3070,5 +3180,5 @@
30703180
"sponsor": {
30713181
"url": "https://github.com/LuaLS/lua-language-server/issues/484"
30723182
},
3073-
"version": "3.6.18"
3183+
"version": "3.6.19"
30743184
}

package.nls.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.",
4747
"config.diagnostics.codestyle": "* codestyle-check\n* spell-check",
4848
"config.diagnostics.codestyle-check": "Enable diagnostics for incorrectly styled lines.",
49+
"config.diagnostics.conventions": "* global-element",
4950
"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.",
5051
"config.diagnostics.deprecated": "Enable diagnostics to highlight deprecated API.",
5152
"config.diagnostics.different-requires": "Enable diagnostics for files which are required by two different paths.",
@@ -62,6 +63,7 @@
6263
"config.diagnostics.empty-block": "Enable empty code block diagnostics.",
6364
"config.diagnostics.enable": "Enable diagnostics.",
6465
"config.diagnostics.global": "* global-in-nil-env\n* lowercase-global\n* undefined-env-child\n* undefined-global",
66+
"config.diagnostics.global-element": "Enable diagnostics to warn about global elements.",
6567
"config.diagnostics.global-in-nil-env": "Enable cannot use global variables ( `_ENV` is set to `nil`) diagnostics.",
6668
"config.diagnostics.globals": "Defined global variables.",
6769
"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",
@@ -70,13 +72,15 @@
7072
"config.diagnostics.ignoredFiles.Disable": "These files are not diagnosed.",
7173
"config.diagnostics.ignoredFiles.Enable": "Always diagnose these files.",
7274
"config.diagnostics.ignoredFiles.Opened": "Only when these files are opened will it be diagnosed.",
75+
"config.diagnostics.incomplete-signature-doc": "Incomplete @param or @return annotations for functions.",
7376
"config.diagnostics.invisible": "Enable diagnostics for accesses to fields which are invisible.",
7477
"config.diagnostics.libraryFiles": "How to diagnose files loaded via `Lua.workspace.library`.",
7578
"config.diagnostics.libraryFiles.Disable": "These files are not diagnosed.",
7679
"config.diagnostics.libraryFiles.Enable": "Always diagnose these files.",
7780
"config.diagnostics.libraryFiles.Opened": "Only when these files are opened will it be diagnosed.",
7881
"config.diagnostics.lowercase-global": "Enable lowercase global variable definition diagnostics.",
79-
"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",
82+
"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* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator",
83+
"config.diagnostics.missing-global-doc": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.",
8084
"config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.",
8185
"config.diagnostics.missing-return": "Enable diagnostics for functions with return annotations which have no return statement.",
8286
"config.diagnostics.missing-return-value": "Enable diagnostics for return statements without values although the containing function declares returns.",

package.nls.pt-br.json

+5-1
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
"config.diagnostics.code-after-break": "Enable diagnostics for code placed after a break statement in a loop.",
4747
"config.diagnostics.codestyle": "* codestyle-check\n* spell-check",
4848
"config.diagnostics.codestyle-check": "Enable diagnostics for incorrectly styled lines.",
49+
"config.diagnostics.conventions": "* global-element",
4950
"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.",
5051
"config.diagnostics.deprecated": "Enable diagnostics to highlight deprecated API.",
5152
"config.diagnostics.different-requires": "Enable diagnostics for files which are required by two different paths.",
@@ -62,6 +63,7 @@
6263
"config.diagnostics.empty-block": "空代码块",
6364
"config.diagnostics.enable": "Enable diagnostics.",
6465
"config.diagnostics.global": "* global-in-nil-env\n* lowercase-global\n* undefined-env-child\n* undefined-global",
66+
"config.diagnostics.global-element": "Enable diagnostics to warn about global elements.",
6567
"config.diagnostics.global-in-nil-env": "不能使用全局变量( `_ENV` 被设置为了 `nil`)",
6668
"config.diagnostics.globals": "Defined global variables.",
6769
"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",
@@ -70,13 +72,15 @@
7072
"config.diagnostics.ignoredFiles.Disable": "These files are not diagnosed.",
7173
"config.diagnostics.ignoredFiles.Enable": "Always diagnose these files.",
7274
"config.diagnostics.ignoredFiles.Opened": "Only when these files are opened will it be diagnosed.",
75+
"config.diagnostics.incomplete-signature-doc": "Incomplete @param or @return annotations for functions.",
7376
"config.diagnostics.invisible": "Enable diagnostics for accesses to fields which are invisible.",
7477
"config.diagnostics.libraryFiles": "How to diagnose files loaded via `Lua.workspace.library`.",
7578
"config.diagnostics.libraryFiles.Disable": "These files are not diagnosed.",
7679
"config.diagnostics.libraryFiles.Enable": "Always diagnose these files.",
7780
"config.diagnostics.libraryFiles.Opened": "Only when these files are opened will it be diagnosed.",
7881
"config.diagnostics.lowercase-global": "首字母小写的全局变量定义",
79-
"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",
82+
"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* undefined-doc-class\n* undefined-doc-name\n* undefined-doc-param\n* unknown-cast-variable\n* unknown-diag-code\n* unknown-operator",
83+
"config.diagnostics.missing-global-doc": "Missing annotations for globals! Global functions must have a comment and annotations for all parameters and return values.",
8084
"config.diagnostics.missing-parameter": "Enable diagnostics for function calls where the number of arguments is less than the number of annotated function parameters.",
8185
"config.diagnostics.missing-return": "Enable diagnostics for functions with return annotations which have no return statement.",
8286
"config.diagnostics.missing-return-value": "Enable diagnostics for return statements without values although the containing function declares returns.",

0 commit comments

Comments
 (0)