--[[ return {
    "stevearc/conform.nvim",
    
    event = { "BufReadPre", "BufNewFile" },

    config = function()
        local conform = require("conform")

        conform.setup({
            formatters_by_ft = {
                lua = { "stylua" },
                html = { "htmlbeautifier" },
                css = { { "prettierd", "prettier" } },
                javascript = { { "prettierd", "prettier" } },
                typescript = { { "prettierd", "prettier" } },
                javascriptreact = { { "prettierd", "prettier" } },
                typescriptreact = { { "prettierd", "prettier" } },
                json = { { "prettierd", "prettier" } },
                markdown = { { "prettierd", "prettier" } },
            },
        })

        vim.keymap.set({ "n", "v" }, "<leader>ll", function()
            conform.format({
                lsp_fallback = true,
                async = false,
                timeout_ms = 500,

                -- Format on save
                format_on_save = {
                    timeout_ms = 500,
                    lsp_fallback = true,
                },
            })
        end, { desc = "Format file or range (in visual mode)" })
    end,
} ]]
