chore(conform): replace prettierd with biome

This commit is contained in:
Simon Lasbrugnas 2025-04-17 16:39:03 +02:00
parent f73d54a868
commit 3c9ec34f96
Signed by untrusted user who does not match committer: simon
GPG key ID: 86039876BA6ED8DE

View file

@ -3,13 +3,13 @@ return {
config = function() config = function()
require("conform").setup({ require("conform").setup({
formatters_by_ft = { formatters_by_ft = {
html = { "prettierd" }, html = { "biome" },
yaml = { "prettierd" }, yaml = { "biome" },
javascript = { "prettierd" }, javascript = { "biome" },
javascriptreact = { "prettierd" }, javascriptreact = { "biome" },
markdown = { "prettierd" }, markdown = { "biome" },
typescript = { "prettierd" }, typescript = { "biome" },
typescriptreact = { "prettierd" }, typescriptreact = { "biome" },
["*"] = { "trim_whitespace" }, ["*"] = { "trim_whitespace" },
}, },
format_on_save = { format_on_save = {
@ -17,11 +17,9 @@ return {
lsp_fallback = true, lsp_fallback = true,
}, },
formatters = { formatters = {
prettierd = { biome = {
condition = function() condition = function()
return vim.loop.fs_realpath(".prettierrc.js") ~= nil or return vim.loop.fs_realpath("biome.json") ~= nil end,
vim.loop.fs_realpath(".prettierrc") ~= nil
end,
}, },
}, },
}) })