summaryrefslogtreecommitdiff
path: root/after/plugin/conform.lua
diff options
context:
space:
mode:
Diffstat (limited to 'after/plugin/conform.lua')
-rw-r--r--after/plugin/conform.lua11
1 files changed, 10 insertions, 1 deletions
diff --git a/after/plugin/conform.lua b/after/plugin/conform.lua
index 76f7dca..d233d3a 100644
--- a/after/plugin/conform.lua
+++ b/after/plugin/conform.lua
@@ -1,7 +1,9 @@
require("conform").setup({
formatters_by_ft = {
lua = { "stylua" },
- html = { "prettier" },
+ -- html = { "prettier" },
+ go = { "goimports", "gofmt" },
+ c = { "clang-format" },
},
format_on_save = {
-- These options will be passed to conform.format()
@@ -9,3 +11,10 @@ require("conform").setup({
lsp_format = "fallback",
},
})
+
+require("conform").formatters["clang-format"] = {
+ prepend_args = {
+ "--style",
+ "{IndentWidth: 4, AlignAfterOpenBracket: BlockIndent, AlignConsecutiveAssignments: Consecutive, AlignArrayOfStructures: Right, BreakBeforeBraces: Linux}",
+ },
+}