Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Lua Formatter 2026New to Visual Studio Code? Get it now.
Lua Formatter 2026

Lua Formatter 2026

bang1337

|
113 installs
| (1) | Free
Formats Lua and Luau. Semicolons are optional in Lua; this formatter writes them so statement boundaries stay obvious.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VS Code Marketplace


A simple formatter for Lua and Luau.

supports things like:

  • Lua 5.1, 5.4
  • Luau types and generics
  • Labels and goto
  • Compound assignment
  • String interpolation
  • Backtick strings
  • Tables and functions

it keeps names and library APIs as they are

example

local function greet(name)
  print("hi " .. name);
end

local message = `Hello {name}!`;

greet("world");

Commands

  • Format Document - shift + alt + f (literally default vscode format)
  • Lua Formatter: Format Document
  • Lua Formatter: Configure — pick a setting
  • Lua Formatter: Semicolons — true or false
  • Lua Formatter: Quote Style
  • Lua Formatter: Trailing Commas
  • Lua Formatter: Final Newline
  • Lua Formatter: Indent Size
  • Lua Formatter: Use Tabs
  • Lua Formatter: Open Settings

open a .lua or .luau file and format the document!

Settings

Setting Default
luaFormatter.semicolons true
luaFormatter.indentSize 2
luaFormatter.useTabs editor setting
luaFormatter.lineWidth 100
luaFormatter.quoteStyle preserve
luaFormatter.trailingComma multiline
luaFormatter.insertFinalNewline true

License

MIT. check out: LICENSE.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft