nvim: enable spell checking for commits

This commit is contained in:
tastytea 2022-09-29 23:03:20 +02:00
parent 73e1c7742d
commit 1198bc7871
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -11,8 +11,15 @@ neogit.setup {
} }
map('n', '<Leader>gg', neogit.open, 'Open Neogit') map('n', '<Leader>gg', neogit.open, 'Open Neogit')
-- start git commits in insert mode
local gitgroup = vim.api.nvim_create_augroup('config_git', { clear = true }) local gitgroup = vim.api.nvim_create_augroup('config_git', { clear = true })
-- enable spell checking
vim.api.nvim_create_autocmd({ 'FileType' }, {
group = gitgroup,
pattern = { 'gitcommit' },
command = [[setlocal spell]]
})
-- start git commits in insert mode
vim.api.nvim_create_autocmd({ 'FileType' }, { vim.api.nvim_create_autocmd({ 'FileType' }, {
group = gitgroup, group = gitgroup,
pattern = { 'gitcommit', 'gitrebase' }, pattern = { 'gitcommit', 'gitrebase' },