blob: c1262add8113f6b6832c80a725553a5184da2c1f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
# lua-language-server
[![build](https://github.com/LuaLS/lua-language-server/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/LuaLS/lua-language-server/actions/workflows/build.yml)
[![version](https://vsmarketplacebadges.dev/version-short/sumneko.lua.svg)](https://marketplace.visualstudio.com/items?itemName=sumneko.lua)
![installs](https://vsmarketplacebadges.dev/installs-short/sumneko.lua.svg)
![downloads](https://vsmarketplacebadges.dev/downloads-short/sumneko.lua.svg)
***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.
## Features
- ๐ Over 20 supported [annotations](https://github.com/LuaLS/lua-language-server/wiki/Annotations) for documenting your code
- โช Go to definition
- ๐ฆบ Dynamic [type checking](https://github.com/LuaLS/lua-language-server/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)
- ๐ 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)
## Install
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
[![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)
The language server and Visual Studio Code client can be installed from [the VS Code Marketplace](https://marketplace.visualstudio.com/items?itemName=sumneko.lua).
![](https://github.com/LuaLS/vscode-lua/raw/master/images//Install%20In%20VSCode.gif)
### Command Line
[![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)
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] |
## 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)
- [Report an issue][issues]
- [Suggest a feature][issues]
- [Discuss](https://github.com/LuaLS/lua-language-server/discussions)
> If you find any mistakes, please [report it][issues] or open a [pull request][pulls] if you have a fix of your own โค๏ธ
>
> ๅฆๆไฝ ๅ็ฐไบไปปไฝ้่ฏฏ๏ผ่ฏท[ๅ่ฏๆ][issues]ๆไฝฟ็จ[Pull Requests][pulls]ๆฅ็ดๆฅไฟฎๅคใโค๏ธ
[issues]: https://github.com/LuaLS/lua-language-server/issues
[pulls]: https://github.com/LuaLS/lua-language-server/pulls
## Available Languages
- `en-us` ๐บ๐ธ
- `zh-cn` ๐จ๐ณ
- `zh-tw` ๐น๐ผ
- `pt-br` ๐ง๐ท
> **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!
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.
## Contributors
![GitHub Contributors Image](https://contrib.rocks/image?repo=sumneko/lua-language-server)
## Credit
Software that the language server (or the development of it) uses:
* [bee.lua](https://github.com/actboy168/bee.lua)
* [luamake](https://github.com/actboy168/luamake)
* [LPegLabel](https://github.com/sqmedeiros/lpeglabel)
* [LuaParser](https://github.com/LuaLS/LuaParser)
* [ScreenToGif](https://github.com/NickeManarin/ScreenToGif)
* [vscode-languageclient](https://github.com/microsoft/vscode-languageserver-node)
* [lua.tmbundle](https://github.com/textmate/lua.tmbundle)
* [EmmyLua](https://emmylua.github.io)
* [lua-glob](https://github.com/LuaLS/lua-glob)
* [utility](https://github.com/LuaLS/utility)
* [vscode-lua-doc](https://github.com/actboy168/vscode-lua-doc)
* [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
|