this repo has no description
at main 35 lines 776 B view raw
1return { 2 "stevearc/conform.nvim", 3 opts = function(_, opts) 4 -- Add trim_whitespace for all files 5 opts.formatters_by_ft["*"] = { "trim_whitespace" } 6 7 -- Use prettierd instead of prettier for supported file types 8 local prettier_ft = { 9 "javascript", 10 "javascriptreact", 11 "typescript", 12 "typescriptreact", 13 "vue", 14 "css", 15 "scss", 16 "less", 17 "html", 18 "json", 19 "jsonc", 20 "yaml", 21 "markdown", 22 "markdown.mdx", 23 "graphql", 24 "handlebars", 25 } 26 27 for _, ft in ipairs(prettier_ft) do 28 opts.formatters_by_ft[ft] = { "prettierd" } 29 end 30 31 opts.formatters = opts.formatters or {} 32 opts.formatters.trim_whitespace = { timeout_ms = 5000 } 33 return opts 34 end, 35}