Answer: For LuaLS formatting, set "format.enable": true in your .luarc.json and configure Zed's Lua language settings with "format_on_save": "on" and "formatter": "language_server". Alternatively, install StyLua and set the Lua formatter to an external command "stylua" with the listed arguments. Status: Overdue (check was due 2026-11-20T13:42:39Z and has not succeeded) Entry: tool/zed/settings/lua-formatting Revision: 1 Digest: sha256:ec97dccb3231137e (changes whenever the content changes) Timeline: Created: 2026-11-13T04:04:08Z Last changed: 2026-11-13T04:04:08Z Last verified: 2026-11-19T13:42:39Z Next check: 2026-11-20T13:42:39Z Check interval: Daily Expected change: No fixed schedule Data: Field | Value | Source | As of LuaLS format enable setting | "format.enable": true | [1] | 2026-11-19 LuaLS formatter | "formatter": "language_server" | [1] | 2026-11-19 format on save | "format_on_save": "on" | [1] | 2026-11-19 StyLua install command | brew install stylua | [1] | 2026-11-19 StyLua external command | "command": "stylua" | [1] | 2026-11-19 StyLua syntax argument | --syntax=Lua54 | [1] | 2026-11-19 Sources: [1] Zed Industries. "zed.dev/docs/languages/lua.md". https://zed.dev/docs/languages/lua.md Role: primary. Accessed: 2026-11-19T13:42:39Z Quote: "make sure you have `"format.enable": true,` in your .luarc.json" (Supports: LuaLS format enable setting) Quote: ""formatter": "language_server"" (Supports: LuaLS formatter) Quote: ""format_on_save": "on"" (Supports: format on save) Quote: "`brew install stylua`" (Supports: StyLua install command) Quote: ""command": "stylua"" (Supports: StyLua external command) Quote: ""--syntax=Lua54"" (Supports: StyLua syntax argument) Snapshot SHA-256: 99cce81d2955851e5d9d5971e74d6db440afd13af254208d4ebbb4cee03044c3 (captured 2026-11-13T04:04:07Z) Verification: Method: Automated extraction from [1] with deepseek-flash (JSON output, thinking disabled). Every value was checked by code to appear verbatim in a quoted passage of [1]. On this check the text of [1] was unchanged since 2026-11-13T04:04:08Z, so the values verified then were kept. Cross-check: not-available at 2026-11-19T13:42:39Z. No independent second source is configured for this entry Last successful check: 2026-11-19T13:42:39Z Last attempt: 2026-11-19T13:42:39Z Notes and limitations: Extracted automatically from a single official source (section "Formatting"). Human-readable page: https://zed.dev/docs/languages/lua.html Related: https://latestn.com/tool/zed/settings/luacats-definitions How do I add LuaCATS definitions for better autocompletion in Zed? https://latestn.com/tool/zed/settings/luau-auto-formatting-setup How do I set up automatic formatting for Luau in Zed? https://latestn.com/tool/zed/settings/map-env-files-to-shell-script How do I make Zed treat .env files as Shell Script so shell tooling runs on them? https://latestn.com/tool/zed/settings/kotlin-jvm-target How do I set the JVM target for the Kotlin Language Server in Zed? https://latestn.com/tool/zed/settings/language-specific-settings How do I configure language-specific settings in Zed? https://latestn.com/tool/zed/settings/light-dark-themes How do I set different Zed themes for light and dark mode? https://latestn.com/tool/ All entries in AI tools Change log: Time | Event | Change | Source 2026-11-13T04:04:08Z | added | Entry created | — Changes for this entry as a feed: https://latestn.com/tool/zed/settings/lua-formatting/latest Challenge this entry: Open challenges: None How: If a value here is wrong or out of date, send what is wrong and a link to evidence. Challenges are queued and checked against the evidence; they do not change the entry by themselves. If the entry changes as a result, the change log says so. Form: https://latestn.com/dispute/tool/zed/settings/lua-formatting POST: https://latestn.com/dispute/tool/zed/settings/lua-formatting with claim, evidence_url, and optionally field and contact (form-encoded or JSON) GET: https://latestn.com/dispute/tool/zed/settings/lua-formatting?claim={what is wrong}&evidence_url={link} How to cite: LatestN. (2026). How do I enable or configure Lua formatting in Zed with LuaLS or StyLua? Revision 1, last verified 2026-11-19T13:42:39Z. https://latestn.com/tool/zed/settings/lua-formatting (accessed 2026-11-21T09:50:34Z). @misc{LatestN_tool_zed_settings_lua_formatting_r1, title = {How do I enable or configure Lua formatting in Zed with LuaLS or StyLua?}, author = {{LatestN}}, year = {2026}, howpublished = {\url{https://latestn.com/tool/zed/settings/lua-formatting}}, note = {Revision 1; digest sha256:ec97dccb3231137e; last verified 2026-11-19T13:42:39Z; accessed 2026-11-21T09:50:34Z} } Reuse: License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/) Attribution: Copying and adapting are allowed, including commercially, if you credit LatestN and link to the entry you used. Each entry ends with a ready-made citation. URL: https://latestn.com/tool/zed/settings/lua-formatting