diff options
Diffstat (limited to 'after')
-rw-r--r-- | after/plugin/conform.lua | 11 | ||||
-rw-r--r-- | after/plugin/luasnip.lua | 6 |
2 files changed, 13 insertions, 4 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}", + }, +} diff --git a/after/plugin/luasnip.lua b/after/plugin/luasnip.lua index e14a1a5..e882168 100644 --- a/after/plugin/luasnip.lua +++ b/after/plugin/luasnip.lua @@ -26,6 +26,6 @@ ls.config.set_config({ history = true, }) -ls.add_snippets("all", { - ls.parser.parse_snippet("expand", "-- this is $1 expanded $2 $3!"), -}) +-- ls.add_snippets("all", { +-- ls.parser.parse_snippet("expand", "-- this is $1 expanded $2 $3!"), +-- }) |