Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

docs: Improve LuaLS formatter example (#32084)

Peter Tripp79f96a5afef3
diff --git a/docs/src/languages/lua.md b/docs/src/languages/lua.md
index 4ad143ce41d..db060033a66 100644
--- a/docs/src/languages/lua.md
+++ b/docs/src/languages/lua.md
@@ -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: