diff options
| author | Aotrix <[email protected]> | 2026-04-22 20:03:11 +0200 |
|---|---|---|
| committer | Aotrix <[email protected]> | 2026-04-22 20:03:11 +0200 |
| commit | 4a0c7f5f4b81ddb357aee3f4009dfcec09552a5f (patch) | |
| tree | b9ad6cf7fa9a16c5e751807ceaae709c86bbf8bf /lua/aotrix/plugins/autoformat.lua | |
| parent | 25e41c9d2adce196991a82001a325e58bd6198a2 (diff) | |
Added an autoformatter for cmake
Diffstat (limited to 'lua/aotrix/plugins/autoformat.lua')
| -rw-r--r-- | lua/aotrix/plugins/autoformat.lua | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lua/aotrix/plugins/autoformat.lua b/lua/aotrix/plugins/autoformat.lua index 2f02eef..f1b2840 100644 --- a/lua/aotrix/plugins/autoformat.lua +++ b/lua/aotrix/plugins/autoformat.lua @@ -2,17 +2,19 @@ return { "stevearc/conform.nvim", opts = { notify_on_error = false, - format_on_save = { timeout_ms = 500, lsp_fallback = true }, + format_on_save = {timeout_ms = 500, lsp_fallback = true}, formatters_by_ft = { - lua = { "lua-format" }, - cpp = { "clang_format" }, - cmake = { "cmakelang" } + lua = {"lua-format"}, + cpp = {"clang_format"}, + cmake = {"gersemi"} }, formatters = { clang_format = { - prepend_args = { '--style={BasedOnStyle: LLVM, IndentWidth: 4, ColumnLimit: 120}' } + prepend_args = { + '--style={BasedOnStyle: LLVM, IndentWidth: 4, ColumnLimit: 120}' + } }, - shfmt = { prepend_args = { '-i', '4' } } + shfmt = {prepend_args = {'-i', '4'}} } } } |
