Skip to content

Commit

Permalink
Add conform for better formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
cschindlbeck committed Aug 28, 2024
1 parent 879399d commit 7efe934
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lua/plugins/formatter.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
return {
"stevearc/conform.nvim",
opts = {},
config = function()
require("conform").setup({
formatters_by_ft = {
-- lua = { "stylua" },
-- -- Conform will run multiple formatters sequentially
-- python = { "isort", "black" },
-- -- You can customize some of the format options for the filetype (:help conform.format)
-- rust = { "rustfmt", lsp_format = "fallback" },
-- Conform will run the first available formatter
-- javascript = { "prettierd", "prettier", stop_after_first = true },
yaml = { "yamlfmt", stop_after_first = true },
},
format_on_save = {
-- These options will be passed to conform.format()
timeout_ms = 500,
lsp_format = "fallback",
},
})
end,
}

0 comments on commit 7efe934

Please sign in to comment.