This commit is contained in:
Christian Nieves
2024-01-06 07:49:08 -06:00
parent cbb6f0cb51
commit 5995aeaf32

View File

@ -1,6 +1,18 @@
return { return {
{ {
"stevearc/conform.nvim", "stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
"<leader>fmt",
function()
require("conform").format({ async = true, lsp_fallback = true })
end,
mode = "",
desc = "Format buffer",
},
},
opts = { opts = {
formatters_by_ft = { formatters_by_ft = {
-- Conform will run multiple formatters sequentially -- Conform will run multiple formatters sequentially
@ -26,9 +38,8 @@ return {
lsp_fallback = true, lsp_fallback = true,
}, },
formatters = { formatters = {
my_formatter = { gdformat = {
command = "gdformat", prepend_args = { "-l", "100" },
args = { "-l 100" },
}, },
}, },
}, },