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