aboutsummaryrefslogtreecommitdiff
path: root/store/config/nvim/lua/setup/plugins/conform.lua
blob: 57b74a94cafbf80de17eecb7038c02f2c4f6572c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
local function setup()
    require("conform").setup({
        formatters_by_ft = {
            javascript = { "prettierd", "prettier", stop_after_first = true },
            typescript = { "prettierd", "prettier", stop_after_first = true },
            javascriptreact = { "prettierd", "prettier", stop_after_first = true },
            typescriptreact = { "prettierd", "prettier", stop_after_first = true },
        },
        default_format_opts = {
            lsp_format = "fallback",
        },
    })
end

return {
    setup = setup
}