return {
	"stevearc/conform.nvim",
	event = { "BufWritePre" },
	cmd = { "ConformInfo" },
	keys = {
		{
			"<leader>F",
			function()
				require("conform").format({ async = true, lsp_fallback = true })
			end,
			mode = "",
			desc = "Format buffer",
		},
	},
	opts = {
		-- Defined formatters
		formatters_by_ft = {
			lua = { "stylua" },
			sh = { "shfmt" },

			python = { "better_ruff", "ruff_format" },
			go = { "gofmt" },

			html = { "prettierd", "prettier", stop_after_first = true },
			css = { "prettierd", "prettier", stop_after_first = true },
			javascript = { "prettierd", "prettier", stop_after_first = true },
			typescript = { "prettierd", "prettier", stop_after_first = true },

			json = { "prettierd", "prettier_f", stop_after_first = true },
			jsonc = { "prettierd_f", "prettier_f", stop_after_first = true },

			markdown = { "prettierd", "prettier", stop_after_first = true },
		},
		-- Custom formatters
		formatters = {
			better_ruff = {
				command = "ruff",
				args = {
					"check",
					"--unfixable",
					"F401",
					"--fix",
					"--select",
					"I",
					-- "F", "E", "W", "C90", "I", "S", "BLE", "T20", "ERA"
					"--stdin-filename",
					"$FILENAME",
					"-",
				},
				stdin = true,
			},

			prettierd = {
				args = { "--tab-width", "2" },
			},
			prettier = {
				args = { "--tab-width", "2" },
			},
			prettierd_f = {
				command = "prettierd",
				args = { "--tab-width", "4" },
				stdin = true,
			},
			prettier_f = {
				command = "prettier",
				args = { "--tab-width", "4" },
				stdin = true,
			},
		},
		format_on_save = { timeout_ms = 5000, lsp_fallback = true },
	},
	init = function()
		vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
	end,
}
