23 lines
501 B
Lua
23 lines
501 B
Lua
-- 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" },
|
|
},
|
|
formatters = {
|
|
prettier = {
|
|
args = { "--stdin-filepath", "$FILENAME", "--single-quote" },
|
|
},
|
|
},
|
|
format_on_save = {
|
|
lsp_fallback = true,
|
|
},
|
|
log_level = vim.log.levels.ERROR,
|
|
notify_on_error = true,
|
|
})
|