docs: Improve LuaLS formatter example (#32084)
- Closes https://github.com/zed-extensions/lua/issues/4 Release Notes: - N/A
This commit is contained in:
parent
81058ee172
commit
79f96a5afe
1 changed files with 12 additions and 3 deletions
|
@ -107,9 +107,18 @@ To enable [Inlay Hints](../configuring-languages#inlay-hints) for LuaLS in Zed
|
|||
|
||||
## Formatting
|
||||
|
||||
### LuaLS
|
||||
### LuaLS Formatting
|
||||
|
||||
To enable auto-formatting with your LuaLS (provided by [CppCXY/EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle)) make sure you have `"format.enable": true,` in your .luarc.json add the following to your Zed `settings.json`:
|
||||
To enable auto-formatting with your LuaLS (provided by [CppCXY/EmmyLuaCodeStyle](https://github.com/CppCXY/EmmyLuaCodeStyle)) make sure you have `"format.enable": true,` in your .luarc.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
|
||||
"format.enable": true
|
||||
}
|
||||
```
|
||||
|
||||
Then add the following to your Zed `settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
|
@ -124,7 +133,7 @@ To enable auto-formatting with your LuaLS (provided by [CppCXY/EmmyLuaCodeStyle]
|
|||
|
||||
You can customize various EmmyLuaCodeStyle style options via `.editorconfig`, see [lua.template.editorconfig](https://github.com/CppCXY/EmmyLuaCodeStyle/blob/master/lua.template.editorconfig) for all available options.
|
||||
|
||||
### StyLua
|
||||
### StyLua Formatting
|
||||
|
||||
Alternatively to use [StyLua](https://github.com/JohnnyMorganz/StyLua) for auto-formatting:
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue