1
0
neovim_config/lua/barink/plugins/conform.lua

19 lines
374 B
Lua
Raw Normal View History

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,
}