Files
lazyvim-config/lua/plugins/formatting.lua
T
2025-10-09 16:24:41 +01:00

33 lines
826 B
Lua

return {
{
"stevearc/conform.nvim",
opts = {
formatters = {
prettier = {
command = "/home/pastilhas/.local/share/mise/installs/node/22.20.0/bin/prettier",
args = { "--no-config", "--stdin-filepath", "$FILENAME" },
},
},
formatters_by_ft = {
javascript = { "prettier" },
typescript = { "prettier" },
javascriptreact = { "prettier" },
typescriptreact = { "prettier" },
css = { "prettier" },
html = { "prettier" },
json = { "prettier" },
yaml = { "prettier" },
lua = { "stylua" },
python = { "isort", "black" },
},
},
},
{
"mason-org/mason.nvim",
opts = function(_, opts)
vim.list_extend(opts.ensure_installed, {
"prettier",
})
end,
},
}