diff --git a/README.md b/README.md index 661227f..cef0d8b 100644 --- a/README.md +++ b/README.md @@ -18,8 +18,9 @@ - [ ] [golines](https://pkg.go.dev/github.com/segmentio/golines) - [ ] [google-java-format](https://github.com/google/google-java-format) - [ ] [isort](https://github.com/PyCQA/isort) -- [ ] [mixformat](https://github.com/elixir-lang/elixir/) - [x] [latexindent](https://github.com/cmhughes/latexindent.pl) +- [ ] [mixformat](https://github.com/elixir-lang/elixir/) +- [ ] [nixfmt](https://github.com/serokell/nixfmt) - [ ] [pg_format](https://github.com/darold/pgFormatter) - [x] [prettier](https://github.com/prettier/prettier) - [ ] [rubocop](https://github.com/rubocop/rubocop) diff --git a/lua/guard-collection/formatter.lua b/lua/guard-collection/formatter.lua index 84baf57..9ec3400 100644 --- a/lua/guard-collection/formatter.lua +++ b/lua/guard-collection/formatter.lua @@ -81,6 +81,11 @@ M.mixformat = { fname = true, } +M.nixfmt = { + cmd = 'nixfmt', + stdin = true, +} + M.pg_format = { cmd = 'pg_format', stdin = true, diff --git a/test/setup.sh b/test/setup.sh index afc3c74..6a3c714 100644 --- a/test/setup.sh +++ b/test/setup.sh @@ -35,6 +35,10 @@ chmod +x $bin/stylua wget -q "$gh/cmhughes/latexindent.pl/releases/download/V3.22.2/latexindent-linux" chmod +x latexindent-linux mv latexindent-linux $bin/latexindent +# nixfmt +wget -q "$gh/serokell/nixfmt/releases/download/v0.5.0/nixfmt" +chmod +x nixfmt +mv nixfmt $bin/nixfmt # test setup luarocks install vusted