add autocmd for gitcommit filetype

This commit is contained in:
2024-11-29 13:28:10 -05:00
parent 8f5522b0d7
commit eee5c1c197
+18 -9
View File
@@ -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,
})