return { "stevearc/conform.nvim", event = { "BufReadPre", "BufNewFile" }, keys = { { "cf", function() require("conform").format({ async = true, lsp_fallback = true, }) end, desc = "Format file", }, }, opts = { formatters_by_ft = { sh = { "shfmt" }, -- brew install, pkg install shfmt bash = { "shfmt" }, python = { "ruff_format" }, -- brew install ruff, pkg install ruff lua = { "stylua" }, -- brew install stylua, pkg install stylua typescript = { "prettier" }, -- npm install -g prettier javascript = { "prettier" }, json = { "jq" }, -- brew install jq, pkg install jq -- cpp = { "clang_format" }, }, }, config = function(_, opts) require("conform").setup(opts) end, }