summaryrefslogtreecommitdiff
path: root/after/plugin/conform.lua
diff options
context:
space:
mode:
authorRaymaekers Luca <luca@spacehb.net>2025-04-05 15:36:24 +0200
committerRaymaekers Luca <luca@spacehb.net>2025-04-05 15:36:24 +0200
commitddad9ca6370c97991679bcfd91704e8548bb973a (patch)
tree09ebbb33f9a65be421890d4964f567676cf21967 /after/plugin/conform.lua
parent7870db20ff0594474daf7cab957cd936d4c246c7 (diff)
parent2c433c348662ee6e4ee5c99a8f5e400858013fa2 (diff)
Merge branch 'fast'
Diffstat (limited to 'after/plugin/conform.lua')
-rw-r--r--after/plugin/conform.lua53
1 files changed, 0 insertions, 53 deletions
diff --git a/after/plugin/conform.lua b/after/plugin/conform.lua
deleted file mode 100644
index 643743f..0000000
--- a/after/plugin/conform.lua
+++ /dev/null
@@ -1,53 +0,0 @@
-local conform = require("conform")
-conform.setup({
- formatters_by_ft = {
- lua = { "stylua" },
- -- html = { "prettier" },
- go = { "goimports", "gofmt" },
- },
- format_on_save = {
- -- These options will be passed to conform.format()
- timeout_ms = 500,
- lsp_format = "never",
- },
-})
-
--- conform.formatters["clang-format"] = {
--- prepend_args = {
--- "--style",
--- "{"
--- .. "IndentWidth: 4, "
--- .. "AlignAfterOpenBracket: BlockIndent, "
--- .. "AlignArrayOfStructures: Right, "
--- .. "BreakBeforeBraces: Linux, "
--- .. "PointerAlignment: Left,"
--- .. "AllowShortIfStatementsOnASingleLine: true, "
--- .. "AllowShortLoopsOnASingleLine: true, "
--- .. "AllowAllArgumentsOnNextLine: true, "
--- .. "AllowShortCaseLabelsOnASingleLine: true, "
--- .. "AlwaysBreakAfterReturnType: AllDefinitions, "
--- .. "ColumnLimit: "
--- .. vim.o.tw
--- .. "}",
--- },
--- }
-
--- -- ID of autocmd for CFormat
--- vim.b.CFormatID = nil
--- -- Enable formatting on save for C only when using the :CFormat command
--- vim.api.nvim_create_user_command("CFormat", function()
--- if vim.b.CFormatID == nil then
--- vim.b.CFormatID = vim.api.nvim_create_autocmd("BufWritePre", {
--- buffer = 0,
--- callback = function()
--- conform.format({ formatters = { "clang-format" } })
--- end,
--- })
--- conform.format({ formatters = { "clang-format" } })
--- print("Auto formatting enabled.")
--- else
--- vim.api.nvim_del_autocmd(vim.b.CFormatID)
--- print("Auto formatting disabled.")
--- vim.b.CFormatID = nil
--- end
--- end, {})