added toml formatter, split each language into lsp and format

This commit is contained in:
foxora 2026-03-05 05:50:50 +00:00
parent 56d2fe2922
commit 67c8d10658
4 changed files with 184 additions and 125 deletions

View file

@ -56,11 +56,12 @@ return {
conform.setup({
formatters_by_ft = {
lua = nixCats("lang.lua") and { "stylua" } or nil,
nix = nixCats("lang.nix") and { "alejandra" } or nil,
rust = nixCats("lang.rust") and { "rustfmt", lsp_format = "fallback" } or nil,
haskell = nixCats("lang.haskell") and { "ormolu" } or nil,
proto = nixCats("lang.protobuf") and { "buf" } or nil,
lua = nixCats("lang.lua.format") and { "stylua" } or nil,
nix = nixCats("lang.nix.format") and { "alejandra" } or nil,
rust = nixCats("lang.rust.format") and { "rustfmt", lsp_format = "fallback" } or nil,
haskell = nixCats("lang.haskell.format") and { "ormolu" } or nil,
proto = nixCats("lang.protobuf.format") and { "buf" } or nil,
toml = nixCats("lang.toml.format") and { "taplo" } or nil,
},
format_on_save = {
timeout_ms = 500,