Formatter

Related articles
Language Server Protocol
Lint
Debug adapter protocol
A formatter is a program that automatically indents program source code according to some rules, either predefined or declared in a configuration file.
A formatter for your programming language can be installed natively using the following packages.
Tip
If your language is not in the list, search in the Arch
official repositories
or in the
AUR
. Some programming languages have their own package registry and you may have better luck finding formatter for that language there if it is not packaged in the Arch official repositories or AUR. Lastly, you can try package mangers focusing on development tools like
Nix
or
mise
.
Note
If you want to integrate a formatter into your text editor (e.g. add format-on-save functionality), refer to
Language Server Protocol
page. Some Language Servers provide formatting functionality built in, while others require external formatting provider. In such case, look for it in this list.
Some programming languages provide a formatter out of the box, so you only need to install the package for their official compiler/interpreter or build system. If this is the case, it will be listed here as "Formatter package".
Language
Formatter
Formatter package
Ada/SPARK
Angular
prettier
,
oxfmt
prettier
,
oxfmt
AUR
Ansible
ansible-lint --fix
ansible-lint
Arduino
clang-format
clang
Assembly
Astrojs
biome
biome
Autotools
AWK
Bash
shfmt
,
beautysh
shfmt
,
beautysh
AUR
Bazel
buildifier
buildifier
AUR
Bicep
bicep format
bicep
AUR
C#
csharpier
csharpier
AUR
C3
C, C++, Objective-C
clang-format
clang
Cabal
cabal-fmt
cabal-fmt
Clojure
cljfmt
,
joker
,
cljstyle
,
zprint
cljfmt-bin
AUR
,
joker-bin
AUR
,
cljstyle-bin
AUR
,
zprint-bin
AUR
CMake
cmake_format
,
gersemi
cmake-format
AUR
,
python-gersemi
Crystal
crystal tool format
crystal
CSS, LESS, SASS
prettier
,
biome
,
oxfmt
prettier
,
biome
,
oxfmt
AUR
D
dfmt
dfmt
Dart
dart format
dart
Dhall
dhall format
dhall
Dockerfile, Dockercompose
dockerfmt
dockerfmt
AUR
DOT
Elixir
mix format
elixir
Elm
elm-format
elm-format-bin
AUR
Erlang
erlfmt
erlfmt-git
AUR
F#
fantomas
fantomas-bin
AUR
Fennel
fnlfmt
fnlfmt
Fish
fish_indent
fish
Flow
prettier
prettier
Fortran
fprettify
fprettify
AUR
GDScript
gdscript-formatter
,
gdtoolkit
gdscript-formatter-bin
AUR
,
python-gdtoolkit
AUR
General purpose
prettier
,
uncrustify
,
astyle
,
clang-format
prettier
,
uncrustify
,
astyle
,
clang
Gleam
gleam format
gleam
GOlang
go fmt
,
gofumpt
go
,
gofumpt
GraphQL
prettier
,
biome
,
oxfmt
prettier
,
biome
,
oxfmt
AUR
Groovy
npm-groovy-lint --format
Haskell
ormolu
,
fourmolu
,
stylish-haskell
,
hindent
haskell-ormolu
,
haskell-fourmolu
,
stylish-haskell
,
hindent
Haxe
haxe-formatter
HTML
prettier
,
biome
,
oxfmt
prettier
,
biome
,
oxfmt
AUR
Hyprlang
Janet
spork
janet-spork-git
AUR
Java
google-java-format
,
clang-format
google-java-format
AUR
,
clang
JavaScript
prettier
,
biome
,
oxfmt
,
deno fmt
prettier
,
biome
,
oxfmt
AUR
,
deno
JSON
prettier
,
biome
,
jqlang
,
oxfmt
,
deno fmt
prettier
,
biome
,
jq
,
oxfmt
AUR
,
deno
Julia
JuliaFormatter
Just
just --fmt
just
KDL
kdlfmt
kdlfmt
AUR
Kotlin
ktlint
,
ktfmt
ktlint
,
ktfmt
AUR
Kubernetes
Lean
Lua
stylua
,
LuaFormatter
stylua
,
lua-format
AUR
Makefile
mbake
mbake
AUR
Markdown
prettier
,
mdformat
,
oxfmt
,
deno fmt
prettier
,
mdformat
,
oxfmt
AUR
,
deno
Meson
meson format
meson
Mojo
mojo format
mojo-git
AUR
Nginx
nginx-config-formatter
,
nginxbeautifier
nginx-config-formatter
AUR
,
nginxbeautifier
AUR
Nickel
Nim
nimpretty
,
nph
nim
,
nph-bin
AUR
nix
nixfmt
nixfmt
AUR
Nushell
numft
OCaml, Reason
dune fmt
dune
Odin
odinfmt
odinfmt
OmniSharp
Perl
perltidy
perl-tidy
PHP
php-cs-fixer
,
mago
,
pretty-php
php-cs-fixer
AUR
,
mago
AUR
,
pretty-php
AUR
Pkl
pkl format
pkl
AUR
Pony
PowerShell
PSScriptAnalyzer
PureScript
purescript-tidy
Python
black
,
ruff
python-black
,
ruff
QML
qmlformat
qt5-declarative
R
air
,
styler
,
formatR
r-air-bin
AUR
,
r-styler
AUR
,
r-formatr
AUR
Racket
raco fmt
ReScript
rescript format
Roc
roc fmt
roc-nightly-bin
AUR
RST
Ruby
rubocop
rubocop
Rust
rustfmt
rust
Scala
scalafmt
scalafmt
AUR
Solidity
SQL
sqlfluff
,
sqlparse
,
sqruff
,
sqlfmt
,
sql-formatter
sqlfluff
,
python-sqlparse
,
sqruff-bin
AUR
,
sqlfmt-bin
AUR
,
sql-formatter
AUR
Standard ML
smlfmt
smlfmt
AUR
Svelte
biome
biome
Swift
swift-format
swift-format
AUR
Systemd
SystemVerilog
verible
verible
AUR
Tcl
Terraform
terraform fmt
terraform
(La)TeX
tex-fmt
,
latexindent
tex-fmt
AUR
,
texlive-binextra
TOML
taplo
,
tombi
,
oxfmt
taplo-cli
,
tombi
,
oxfmt
AUR
TypeScript
prettier
,
biome
,
oxfmt
,
deno fmt
prettier
,
biome
,
oxfmt
AUR
,
deno
Typst
typstyle
typstyle
V
v fmt
vlang
AUR
Vala
Vimscript
Vue
prettier
,
biome
,
oxfmt
prettier
,
biome
,
oxfmt
AUR
WebAssembly
XML
tidy
,
xmlformatter
tidy
,
python-xmlformatter
AUR
YAML
yamlfmt
,
prettier
,
yamlfix
,
oxfmt
yamlfmt
,
prettier
,
yamlfix
AUR
,
oxfmt
AUR
Zig
zig fmt
zig
Zsh
shfmt
shfmt