.dotfiles/global/.config/nvim/lua/plugins/conform.lua
2025-07-12 00:45:23 +02:00

41 lines
837 B
Lua

return {
"stevearc/conform.nvim",
opts = {
log_level = vim.log.levels.DEBUG,
icon = "", --'▎',
formatters_by_ft = {
awk = { "gawk_fmt" },
lua = { "stylua" },
python = { "ruff_format", "ruff_fix", "isort" },
javascript = { "biome" },
typescript = { "biome" },
javascriptreact = { "biome" },
typescriptreact = { "biome" },
json = { "biome" },
sh = { "shfmt" },
markdown = { "prettier" },
css = { "prettier" },
html = { "prettier" },
htmldjango = { "prettier" },
["*"] = { "trim_whitespace", "codespell" },
},
formatters = {
gawk_fmt = {
command = "gawk",
args = function(ctx)
return {
"-f",
"$FILENAME",
"-o-",
}
end,
stdin = true,
},
},
format_on_save = {
timeout_ms = 1000,
lsp_fallback = true,
},
},
lazy = false,
}