2024-04-08 07:31:50 +00:00
|
|
|
-- TODO: prettierd
|
|
|
|
-- TODO: async save-on-write? Or set timeout.
|
|
|
|
require("conform").setup({
|
|
|
|
formatters_by_ft = {
|
|
|
|
javascript = { "prettier" },
|
|
|
|
go = { "goimports" },
|
|
|
|
lua = { "stylua" },
|
|
|
|
rust = { "rustfmt" },
|
|
|
|
typescript = { "prettier" },
|
|
|
|
typescriptreact = { "prettier" },
|
2024-06-21 04:57:41 +00:00
|
|
|
css = { "prettier" },
|
|
|
|
scss = { "prettier" },
|
2024-04-08 07:31:50 +00:00
|
|
|
},
|
|
|
|
formatters = {
|
|
|
|
prettier = {
|
|
|
|
args = { "--stdin-filepath", "$FILENAME", "--single-quote" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
format_on_save = {
|
|
|
|
lsp_fallback = true,
|
|
|
|
},
|
|
|
|
log_level = vim.log.levels.ERROR,
|
2024-11-10 13:45:53 +00:00
|
|
|
notify_on_error = false,
|
2024-04-08 07:31:50 +00:00
|
|
|
})
|