conform.lua 491 B

1234567891011121314151617
  1. return {
  2. "stevearc/conform.nvim",
  3. opts = {},
  4. config = function()
  5. require("conform").setup({
  6. formatters_by_ft = {
  7. lua = { "stylua" },
  8. -- Conform will run multiple formatters sequentially
  9. -- Use a sub-list to run only the first available formatter
  10. javascript = { { "prettierd", "prettier" } },
  11. rust = { "rustfmt", lsp_format = "fallback" },
  12. typst = { "typstyle", lsp_format = "last" },
  13. html = { "prettier", lsp_format = "fallback" },
  14. },
  15. })
  16. end,
  17. }