Files
nvim/lua/plugins/conform.lua
hgranthorner 0485e97fd2 initial commit
2026-09-14 16:09:15 -04:00

19 lines
411 B
Lua

vim.pack.add({
"https://github.com/stevearc/conform.nvim",
})
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
-- Conform will run the first available formatter
javascript = { "prettierd", "prettier", stop_after_first = true },
},
})
vim.api.nvim_create_autocmd("BufWritePre", {
pattern = "*",
callback = function(args)
require("conform").format({ bufnr = args.buf })
end,
})