From b0679fa52fabde5d91386d4b54d81f4d58f6a660 Mon Sep 17 00:00:00 2001 From: Roman Date: Thu, 1 Oct 2026 22:15:45 +0200 Subject: [PATCH] easier norm complience --- aliases | 7 +++++++ nvim/.config/nvim/lua/romanzy/commands.lua | 5 ++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/aliases b/aliases index fed39a7..00377ce 100644 --- a/aliases +++ b/aliases @@ -18,3 +18,10 @@ cc-run(){ rm "${file}.out" } + +# https://pypi.org/project/c-formatter-42/ +# install via +# pip3 install --user c-formatter-42 +norm(){ + c_formatter_42 *.c *.h +} diff --git a/nvim/.config/nvim/lua/romanzy/commands.lua b/nvim/.config/nvim/lua/romanzy/commands.lua index d1c1bf5..e7e70db 100644 --- a/nvim/.config/nvim/lua/romanzy/commands.lua +++ b/nvim/.config/nvim/lua/romanzy/commands.lua @@ -3,7 +3,8 @@ local ac = vim.api.nvim_create_autocmd local aug = vim.api.nvim_create_augroup uc("W", "w|e", { desc = "write file then refresh buffer" }) -uc("ProjectDiagnostics", require("romanzy.custom.project_diagnostics").run, { desc = "check project warnings and errors" }) +uc("ProjectDiagnostics", require("romanzy.custom.project_diagnostics").run, + { desc = "check project warnings and errors" }) ac("TextYankPost", { desc = "Highlight when yanking text", @@ -13,6 +14,8 @@ ac("TextYankPost", { end, }) +uc("NormFormat", "!c_formatter_42 *.c *.h", { desc = "comply with the norm in C" }) + -- ac("LspAttach", { -- desc = "Notify user about attached LSP clients", -- group = aug("LSPOnAttach", { clear = true }),