19 lines
374 B
Lua
19 lines
374 B
Lua
|
return {
|
||
|
"stevearc/conform.nvim",
|
||
|
opts = {},
|
||
|
config = function()
|
||
|
require("conform").setup({
|
||
|
formatters_by_ft = {
|
||
|
lua = { "stylua" },
|
||
|
javascript = { { "prettierd", "prettier" } },
|
||
|
},
|
||
|
})
|
||
|
vim.api.nvim_create_autocmd("BufWritePre", {
|
||
|
pattern = "*",
|
||
|
callback = function(args)
|
||
|
require("conform").format({ buffer = args.buf })
|
||
|
end,
|
||
|
})
|
||
|
end,
|
||
|
}
|