return { "stevearc/conform.nvim", opts = {}, event = { "BufReadPre", "BufNewFile" }, config = function() local conform = require("conform") conform.setup({ formatters_by_ft = { css = { "prettier" }, elm = { "elm_format" }, graphql = { "prettier" }, json = { "prettier" }, html = { "prettier" }, liquid = { "prettier" }, lua = { "stylua" }, markdown = { "prettier" }, python = { "ruff_fix", "ruff_format" }, rust = { "rustfmt" }, svelte = { "prettier" }, javascript = { "prettier" }, javascriptreact = { "prettier" }, typescript = { "prettier" }, typescriptreact = { "prettier" }, yaml = { "prettier" }, }, format_on_save = { lsp_fallback = true, async = false, timeout_ms = 1000, }, }) vim.keymap.set({ "n", "v" }, "mp", function() conform.format({ lsp_format = "fallback", async = false, timeout_ms = 1000, }) end, { desc = "Format file or range (in visual mode)" }) end, }