local conform = require("conform") ---@type conform.setupOpts local options = { formatters = { phpcbf = { command = "phpcbf", args = { "-" }, stdin = true, exist_codes = { 0, 1 }, }, }, formatters_by_ft = { lua = { "stylua" }, php = { "phpcbf" }, javascript = { "eslint_d" }, typescript = { "eslint_d" }, vue = { "eslint_d" }, }, format_on_save = { timeout_ms = 15000, lsp_format = "fallback", }, } vim.api.nvim_create_autocmd("BufWritePre", { pattern = "*", callback = function(args) conform.format({ bufnr = args.buf }) end, }) conform.setup(options)