1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
return {
"stevearc/conform.nvim",
opts = {
notify_on_error = false,
format_on_save = {timeout_ms = 500, lsp_fallback = true},
formatters_by_ft = {
lua = {"lua-format"},
cpp = {"clang_format"},
cmake = {"gersemi"}
},
formatters = {
clang_format = {
prepend_args = {
'--style={IndentWidth: 4, ColumnLimit: 100, BreakBeforeBraces: Allman, AlignAfterOpenBracket: true, AlignConsecutiveAssignments: true, BreakAfterAttributes: Always, BinPackParameters: AlwaysOnePerLine}'
}
},
shfmt = {prepend_args = {'-i', '4'}}
}
}
}
|