nix-config/modules/nvim/config/lua/plugins/conform.lua

28 lines
753 B
Lua

return {
"stevearc/conform.nvim",
opts = {
formatters_by_ft = {
typescriptreact = { "prettierd" },
astro = { "prettierd" },
typescript = { "prettierd" },
javascript = { "prettierd" },
javascriptreact = { "prettierd" },
html = { "prettierd" },
htmlangular = { "prettierd" },
css = { "prettierd" },
yaml = { "prettierd" },
markdown = { "prettierd" },
json = { "prettierd" },
lua = { "stylua" },
go = { "goimports" },
gomod = { "goimports" },
gowork = { "goimports" },
gotmpl = { "goimports" },
},
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_format = "fallback",
},
},
}