Files
dotfiles/nvim/lua/plugins/prettier.lua
Thomas Naderer d8a20d620a chore: clean up dotfiles and add gitignore whitelist
Switch to whitelist-based .gitignore to only track essential configs:
nvim, yazi, kitty, zsh, ideavim, karabiner, tmux, scripts, starship.
Remove history, compiled files, and plugin dirs from tracking.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-11 12:57:14 +01:00

30 lines
728 B
Lua

return {
"stevearc/conform.nvim",
event = { "BufWritePre" },
cmd = { "ConformInfo" },
keys = {
{
"<leader>fm",
function() require("conform").format({ async = true }) end,
desc = "Format buffer",
},
},
opts = {
formatters_by_ft = {
javascript = { "prettier" },
typescript = { "prettier" },
javascriptreact = { "prettier" },
typescriptreact = { "prettier" },
json = { "prettier" },
html = { "prettier" },
css = { "prettier" },
markdown = { "mdformat" },
yaml = { "prettier" },
},
format_on_save = {
timeout_ms = 500,
lsp_fallback = true,
},
},
}