Skip to content

Commit 4e1d6bb

Browse files
committed
Merge branch 'master' of github.com:CppCXY/lua-language-server into HEAD
2 parents 3bbc55c + a641c26 commit 4e1d6bb

File tree

119 files changed

+4701
-4236
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

119 files changed

+4701
-4236
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ body:
8888
label: Log File
8989
description: >
9090
Please provide your log file. Refer to the wiki to find your log file:
91-
https://github.com/LuaLS/lua-language-server/wiki/FAQ#where-can-i-find-the-log-file
91+
https://luals.github.io/wiki/faq#where-can-i-find-the-log-file
9292
- type: markdown
9393
attributes:
9494
value: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@
44
/meta/*
55
!/meta/template
66
!/meta/3rd
7+
!/meta/whimsical
78
/bin*

README.md

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -8,45 +8,36 @@
88

99
***Lua development just got a whole lot better*** 🧠
1010

11-
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.
11+
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.
12+
13+
[See our website for more info](https://luals.github.io).
1214

1315
## Features
1416

1517
- ⚙️ Supports `Lua 5.4`, `Lua 5.3`, `Lua 5.2`, `Lua 5.1`, and `LuaJIT`
16-
- 📄 Over 20 supported [annotations](https://github.com/LuaLS/lua-language-server/wiki/Annotations) for documenting your code
18+
- 📄 Over 20 supported [annotations](https://luals.github.io/wiki/annotations/) for documenting your code
1719
- ↪ Go to definition
18-
- 🦺 Dynamic [type checking](https://github.com/LuaLS/lua-language-server/wiki/Type-Checking)
20+
- 🦺 Dynamic [type checking](https://luals.github.io/wiki/type-checking/)
1921
- 🔍 Find references
20-
- ⚠️ [Diagnostics/Warnings](https://github.com/LuaLS/lua-language-server/wiki/Diagnostics)
21-
- 🕵️ [Syntax checking](https://github.com/LuaLS/lua-language-server/wiki/Syntax-Errors)
22+
- ⚠️ [Diagnostics/Warnings](https://luals.github.io/wiki/diagnostics/)
23+
- 🕵️ [Syntax checking](https://luals.github.io/wiki/syntax-errors/)
2224
- 📝 Element renaming
2325
- 🗨️ Hover to view details on variables, functions, and more
2426
- 🖊️ Autocompletion
25-
- 📚 Support for [libraries](https://github.com/LuaLS/lua-language-server/wiki/Libraries)
26-
- 💅 [Code formatting](https://github.com/LuaLS/lua-language-server/wiki/Formatter)
27-
- 💬 [Spell checking](https://github.com/LuaLS/lua-language-server/wiki/Formatter)
28-
- 🛠️ Custom [plugins](https://github.com/LuaLS/lua-language-server/wiki/Plugins)
29-
- 📖 [Documentation Generation](https://github.com/LuaLS/lua-language-server/wiki/Export-Documentation)
27+
- 📚 Support for [libraries](https://luals.github.io/wiki/settings/#workspacelibrary)
28+
- 💅 [Code formatting](https://luals.github.io/wiki/formatter/)
29+
- 💬 [Spell checking](https://luals.github.io/wiki/diagnostics/#spell-check)
30+
- 🛠️ Custom [plugins](https://luals.github.io/wiki/plugins/)
31+
- 📖 [Documentation Generation](https://luals.github.io/wiki/export-docs/)
3032

3133
## Install
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).
33-
34-
### Visual Studio Code
35-
[![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)
36-
37-
The language server and Visual Studio Code client can be installed from [the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sumneko.lua).
38-
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).
34+
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/).
4535

46-
### Command Line
47-
[![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)
36+
See [installation instructions on our website](https://luals.github.io/#install).
4837

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/).
38+
[![Install in VS Code](https://img.shields.io/badge/VS%20Code-Install-blue?style=for-the-badge&logo=visualstudiocode "Install in VS Code")](https://luals.github.io/#vscode-install)
39+
[![Install for NeoVim](https://img.shields.io/badge/NeoVim-Install-blue?style=for-the-badge&logo=neovim "Install for NeoVim")](https://luals.github.io/#neovim-install)
40+
[![Other](https://img.shields.io/badge/Other-Install-blue?style=for-the-badge&logo=windowsterminal "Install for command line")](https://luals.github.io/#other-install)
5041

5142
### Community Install Methods
5243
The install methods below are maintained by community members.
@@ -55,8 +46,8 @@ The install methods below are maintained by community members.
5546

5647
## Links
5748
- [Changelog](https://github.com/LuaLS/lua-language-server/blob/master/changelog.md)
58-
- [Wiki](https://github.com/LuaLS/lua-language-server/wiki)
59-
- [FAQ](https://github.com/LuaLS/lua-language-server/wiki/FAQ)
49+
- [Wiki](https://luals.github.io/wiki)
50+
- [FAQ](https://luals.github.io/wiki/faq)
6051
- [Report an issue][issues]
6152
- [Suggest a feature][issues]
6253
- [Discuss](https://github.com/LuaLS/lua-language-server/discussions)
@@ -79,13 +70,13 @@ The install methods below are maintained by community members.
7970
> **Note**
8071
> 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).
8172
82-
Are you able to [provide a translation](https://github.com/LuaLS/lua-language-server/wiki/Translations)? It would be greatly appreciated!
73+
Are you able to [provide a translation](https://luals.github.io/wiki/translations)? It would be greatly appreciated!
8374

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

8677

8778
## Privacy
88-
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.
79+
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.
8980

9081

9182
## Contributors

changelog.md

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,55 @@
11
# changelog
22

3-
## 3.6.26
3+
## 3.7.1
4+
* `FIX` [#2299]
5+
* `FIX` [#2335]
6+
7+
[#2299]: https://github.com/LuaLS/lua-language-server/issues/2299
8+
[#2335]: https://github.com/LuaLS/lua-language-server/issues/2335
9+
10+
## 3.7.0
11+
`2023-8-24`
12+
* `NEW` support `---@type` and `--[[@as]]` for return statement
13+
* `NEW` commandline parameter `--force-accept-workspace`: allowing the use of the root directory or home directory as the workspace
14+
* `NEW` diagnostic: `inject-field`
15+
* `NEW` `---@enum` supports attribute `key`
16+
```lua
17+
---@enum (key) AnimalType
18+
local enum = {
19+
Cat = 1,
20+
Dog = 2,
21+
}
22+
23+
---@param animal userdata
24+
---@param atp AnimalType
25+
---@return boolean
26+
local function isAnimalType(animal, atp)
27+
return API.isAnimalType(animal, enum[atp])
28+
end
29+
30+
assert(isAnimalType(animal, 'Cat'))
31+
```
32+
* `NEW` `---@class` supports attribute `exact`
33+
```lua
34+
---@class (exact) Point
35+
---@field x number
36+
---@field y number
37+
local m = {}
38+
m.x = 1 -- OK
39+
m.y = 2 -- OK
40+
m.z = 3 -- Warning
41+
```
42+
43+
* `FIX` wrong hover and signature for method with varargs and overloads
44+
* `FIX` [#2155]
445
* `FIX` [#2224]
46+
* `FIX` [#2252]
47+
* `FIX` [#2267]
548

49+
[#2155]: https://github.com/LuaLS/lua-language-server/issues/2155
650
[#2224]: https://github.com/LuaLS/lua-language-server/issues/2224
51+
[#2252]: https://github.com/LuaLS/lua-language-server/issues/2252
52+
[#2267]: https://github.com/LuaLS/lua-language-server/issues/2267
753

854
## 3.6.25
955
`2023-7-26`
@@ -875,7 +921,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`.
875921

876922
## 2.6.7
877923
`2022-3-9`
878-
* `NEW` offline diagnostic, [read more](https://github.com/LuaLS/lua-language-server/wiki/Offline-Diagnostic)
924+
* `NEW` diagnosis report, [read more](https://luals.github.io/wiki/diagnosis-report/)
879925
* `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).
880926
* `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.
881927
* `FIX` [#965](https://github.com/LuaLS/lua-language-server/issues/965)
@@ -929,7 +975,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`.
929975

930976
## 2.6.0
931977
`2022-1-13`
932-
* `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.
978+
* `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.
933979
* `NEW` setting:
934980
+ `Lua.hint.arrayIndex`
935981
+ `Lua.semantic.enable`
@@ -1296,7 +1342,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`.
12961342

12971343
## 2.1.0
12981344
`2021-7-2`
1299-
* `NEW` supports local config file, using `--configpath="config.json"`, [learn more here](https://github.com/LuaLS/lua-language-server/wiki/Setting-without-VSCode)
1345+
* `NEW` supports local config file, using `--configpath="config.json"`, [learn more here](https://luals.github.io/wiki/usage/#--configpath)
13001346
* `NEW` goto `type definition`
13011347
* `NEW` infer type by callback param:
13021348
```lua
@@ -1451,7 +1497,7 @@ server will generate `doc.json` and `doc.md` in `LOGPATH`.
14511497

14521498
## 1.20.0
14531499
`2021-3-27`
1454-
* `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)
1500+
* `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)
14551501
* `FIX` [#467](https://github.com/LuaLS/lua-language-server/issues/467)
14561502

14571503
## 1.19.1

doc/en-us/config.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1853,7 +1853,7 @@ false
18531853

18541854
# runtime.plugin
18551855

1856-
Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more.
1856+
Plugin path. Please read the [wiki](https://luals.github.io/wiki/plugins) to learn more.
18571857

18581858
## type
18591859

@@ -2291,4 +2291,4 @@ Array<string>
22912291

22922292
```jsonc
22932293
[]
2294-
```
2294+
```

doc/pt-br/config.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ object<string, string>
738738
```jsonc
739739
{
740740
/*
741-
优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1`
741+
优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1`
742742
*/
743743
"ambiguity-1": "Any",
744744
/*
@@ -1007,7 +1007,7 @@ object<string, string>
10071007
```jsonc
10081008
{
10091009
/*
1010-
优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1`
1010+
优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1`
10111011
*/
10121012
"ambiguity-1": "Warning",
10131013
/*
@@ -1853,7 +1853,7 @@ false
18531853

18541854
# runtime.plugin
18551855

1856-
Plugin path. Please read [wiki](https://github.com/LuaLS/lua-language-server/wiki/Plugins) to learn more.
1856+
Plugin path. Please read the [wiki](https://luals.github.io/wiki/plugins) to learn more.
18571857

18581858
## type
18591859

@@ -2291,4 +2291,4 @@ Array<string>
22912291

22922292
```jsonc
22932293
[]
2294-
```
2294+
```

doc/zh-cn/config.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -738,7 +738,7 @@ object<string, string>
738738
```jsonc
739739
{
740740
/*
741-
优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1`
741+
优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1`
742742
*/
743743
"ambiguity-1": "Any",
744744
/*
@@ -1006,7 +1006,7 @@ object<string, string>
10061006
```jsonc
10071007
{
10081008
/*
1009-
优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1`
1009+
优先级歧义,如:`num or 0 + 1`,推测用户的实际期望为 `(num or 0) + 1`
10101010
*/
10111011
"ambiguity-1": "Warning",
10121012
/*
@@ -1659,7 +1659,7 @@ string
16591659

16601660
# misc.parameters
16611661

1662-
VSCode中启动语言服务时的[命令行参数](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#arguments)
1662+
VSCode中启动语言服务时的[命令行参数](https://luals.github.io/wiki/usage/#arguments)
16631663

16641664
## type
16651665

@@ -1852,7 +1852,7 @@ false
18521852

18531853
# runtime.plugin
18541854

1855-
插件路径,请查阅[文档](https://github.com/LuaLS/lua-language-server/wiki/Plugins)了解用法。
1855+
插件路径,请查阅[文档](https://luals.github.io/wiki/plugins)了解用法。
18561856

18571857
## type
18581858

@@ -2290,4 +2290,4 @@ Array<string>
22902290

22912291
```jsonc
22922292
[]
2293-
```
2293+
```

doc/zh-tw/config.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1659,7 +1659,7 @@ string
16591659

16601660
# misc.parameters
16611661

1662-
VSCode中啟動語言伺服時的[命令列參數](https://github.com/LuaLS/lua-language-server/wiki/Getting-Started#arguments)
1662+
VSCode中啟動語言伺服時的[命令列參數](https://luals.github.io/wiki/usage#arguments)
16631663

16641664
## type
16651665

@@ -1852,7 +1852,7 @@ false
18521852

18531853
# runtime.plugin
18541854

1855-
延伸模組路徑,請查閱[文件](https://github.com/LuaLS/lua-language-server/wiki/Plugins)瞭解用法。
1855+
延伸模組路徑,請查閱[文件](https://luals.github.io/wiki/plugins)瞭解用法。
18561856

18571857
## type
18581858

@@ -2290,4 +2290,4 @@ Array<string>
22902290

22912291
```jsonc
22922292
[]
2293-
```
2293+
```

locale/en-us/meta.lua

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -519,11 +519,11 @@ math.log10 =
519519
'Returns the base-10 logarithm of x.'
520520
math.max =
521521
'Returns the argument with the maximum value, according to the Lua operator `<`.'
522-
math.maxinteger =
522+
math.maxinteger['>5.3'] =
523523
'An integer with the maximum value for an integer.'
524524
math.min =
525525
'Returns the argument with the minimum value, according to the Lua operator `<`.'
526-
math.mininteger =
526+
math.mininteger['>5.3'] =
527527
'An integer with the minimum value for an integer.'
528528
math.modf =
529529
'Returns the integral part of `x` and the fractional part of `x`.'
@@ -557,11 +557,11 @@ math.tan =
557557
'Returns the tangent of `x` (assumed to be in radians).'
558558
math.tanh =
559559
'Returns the hyperbolic tangent of `x` (assumed to be in radians).'
560-
math.tointeger =
560+
math.tointeger['>5.3'] =
561561
'If the value `x` is convertible to an integer, returns that integer.'
562-
math.type =
562+
math.type['>5.3'] =
563563
'Returns `"integer"` if `x` is an integer, `"float"` if it is a float, or `nil` if `x` is not a number.'
564-
math.ult =
564+
math.ult['>5.3'] =
565565
'Returns `true` if and only if `m` is below `n` when they are compared as unsigned integers.'
566566

567567
os =

0 commit comments

Comments
 (0)