From eee5c1c19757aa2a42eff46505dde4ec36ca57e7 Mon Sep 17 00:00:00 2001 From: Charles Danesi Date: Fri, 29 Nov 2024 13:28:10 -0500 Subject: [PATCH] add autocmd for gitcommit filetype --- .config/nvim/lua/core/autocmds.lua | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/.config/nvim/lua/core/autocmds.lua b/.config/nvim/lua/core/autocmds.lua index 7c795c6..bd7f4a0 100644 --- a/.config/nvim/lua/core/autocmds.lua +++ b/.config/nvim/lua/core/autocmds.lua @@ -3,11 +3,20 @@ local augroup = vim.api.nvim_create_augroup -- ──────────────────[ set options for markdown files ]─────────────── autocmd('FileType', { - pattern = 'markdown', - callback = function() - vim.opt_local.textwidth = 80 - vim.opt_local.spell = true - end, + pattern = 'markdown', + callback = function() + vim.opt_local.textwidth = 80 + vim.opt_local.spell = true + end, +}) + +-- ─────────────────────[ set options for gitcommit ]───────────────────── +autocmd('FileType', { + pattern = 'gitcommit', + callback = function() + vim.opt_local.textwidth = 78 + vim.opt_local.spell = true + end, }) -- ┌ @@ -16,8 +25,8 @@ autocmd('FileType', { -- └ augroup('YankHighlight', { clear = true }) autocmd('TextYankPost', { - group = 'YankHighlight', - callback = function() - vim.highlight.on_yank({ higroup = 'IncSearch', timeout = '800' }) - end, -}) + group = 'YankHighlight', + callback = function() + vim.highlight.on_yank({ higroup = 'IncSearch', timeout = '800' }) + end, +}) \ No newline at end of file