2024-12-19 20:50:42 +00:00
|
|
|
return {
|
|
|
|
'stevearc/conform.nvim',
|
2024-12-19 21:05:29 +00:00
|
|
|
event = { "BufWritePre" },
|
|
|
|
cmd = { "ConformInfo" },
|
2024-12-19 20:50:42 +00:00
|
|
|
opts = {
|
|
|
|
formatters_by_ft = {
|
|
|
|
javascript = { "prettierd" },
|
|
|
|
typescript = { "prettierd" },
|
|
|
|
php = { "pint" }
|
|
|
|
},
|
|
|
|
format_on_save = {
|
|
|
|
-- These options will be passed to conform.format()
|
|
|
|
timeout_ms = 500,
|
|
|
|
lsp_format = "fallback",
|
|
|
|
},
|
|
|
|
},
|
2024-12-19 21:05:29 +00:00
|
|
|
init = function()
|
|
|
|
vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
|
|
|
|
end,
|
2024-12-19 20:50:42 +00:00
|
|
|
}
|