prettier working

This commit is contained in:
2025-10-09 16:24:41 +01:00
parent 0f6e782771
commit f918de55a5
3 changed files with 46 additions and 13 deletions
+1 -1
View File
@@ -184,7 +184,7 @@ return {
-- add any tools you want to have installed below
{
"williamboman/mason.nvim",
"mason-org/mason.nvim",
opts = {
ensure_installed = {
"stylua",
+33
View File
@@ -0,0 +1,33 @@
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,
},
}