return { { "stevearc/conform.nvim", opts = { formatters = { prettier = { -- No `command` here on purpose. conform inherits it from its built-in -- prettier definition, which resolves the name on PATH — and mason.nvim -- puts ~/.local/share/nvim/mason/bin on Neovim's PATH, so the copy -- listed in `ensure_installed` below is found automatically. -- -- This used to hardcode a mise node path -- (.../mise/installs/node/22.20.0/bin/prettier). That node version has -- since been replaced by 24.19.0, so the path no longer existed and -- prettier formatting was silently doing nothing. -- -- `args` is set rather than appended, so it replaces conform's default -- argument list. --no-config keeps formatting consistent regardless of -- any .prettierrc in the project. 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, }, }