nvim/lua/plugins/conform.lua
2026-08-18 09:12:45 +02:00

23 lines
714 B
Lua

return {
"stevearc/conform.nvim",
opts = {
format_on_save = {
timeout_ms = 500,
},
formatters_by_ft = {
javascript = { "prettierd", "prettier", "deno_fmt", stop_after_first = true },
typescript = { "prettierd", "prettier", "deno_fmt", stop_after_first = true },
vue = { "prettierd", "prettier", stop_after_first = true },
rust = { "rustfmt", lsp_format = "fallback" },
java = { "spotless", "google-java-format" },
lua = { "stylua" },
php = { "php_cs_fixer", lsp_format = "fallback", stop_after_first = true },
cpp = { "clang-format" },
},
formatters = {
spotless = {
command = "mvn spotless:apply",
},
},
},
}