.dotfiles/.config/nvim/lua/plugins/conform.lua
2026-07-28 12:46:25 +03:00

25 lines
662 B
Lua

vim.pack.add({ "https://github.com/stevearc/conform.nvim" })
local Conform = require("conform")
Conform.setup({
notify_on_error = false,
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_format = "fallback",
},
formatters_by_ft = {
lua = { "stylua" },
javascript = { "biome" },
javascriptreact = { "biome" },
typescript = { "biome" },
typescriptreact = { "biome" },
json = { "biome" },
sh = { "shfmt" },
bash = { "shfmt" },
-- You can use 'stop_after_first' to run the first available formatter from the list
-- javascript = { "prettierd", "prettier", stop_after_first = true },
},
})