add autocmd for gitcommit filetype
This commit is contained in:
@@ -3,11 +3,20 @@ local augroup = vim.api.nvim_create_augroup
|
|||||||
|
|
||||||
-- ──────────────────[ set options for markdown files ]───────────────
|
-- ──────────────────[ set options for markdown files ]───────────────
|
||||||
autocmd('FileType', {
|
autocmd('FileType', {
|
||||||
pattern = 'markdown',
|
pattern = 'markdown',
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.opt_local.textwidth = 80
|
vim.opt_local.textwidth = 80
|
||||||
vim.opt_local.spell = true
|
vim.opt_local.spell = true
|
||||||
end,
|
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 })
|
augroup('YankHighlight', { clear = true })
|
||||||
autocmd('TextYankPost', {
|
autocmd('TextYankPost', {
|
||||||
group = 'YankHighlight',
|
group = 'YankHighlight',
|
||||||
callback = function()
|
callback = function()
|
||||||
vim.highlight.on_yank({ higroup = 'IncSearch', timeout = '800' })
|
vim.highlight.on_yank({ higroup = 'IncSearch', timeout = '800' })
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
Reference in New Issue
Block a user