From b11b4c8a225f020f45bf9d8de0965ca1e6dfaa6c Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Sun, 9 Aug 2026 14:06:55 -0400 Subject: [PATCH] feat: set 100 textwidth in git commits --- .../nvim/.config/nvim/lua/plugins/astrocore.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/stow-packages/nvim/.config/nvim/lua/plugins/astrocore.lua b/stow-packages/nvim/.config/nvim/lua/plugins/astrocore.lua index a604f98..1225338 100644 --- a/stow-packages/nvim/.config/nvim/lua/plugins/astrocore.lua +++ b/stow-packages/nvim/.config/nvim/lua/plugins/astrocore.lua @@ -52,6 +52,17 @@ return { textwidth = 100, }, }, + -- Autocommands can be configured through AstroCore as well. + autocmds = { + gitcommit_textwidth = { + { + event = "FileType", + pattern = "gitcommit", + desc = "Override built-in gitcommit ftplugin's textwidth=72", + callback = function() vim.opt_local.textwidth = 100 end, + }, + }, + }, -- Mappings can be configured through AstroCore as well. -- NOTE: keycodes follow the casing in the vimdocs. For example, `` must be capitalized mappings = { -- 2.51.2