nvim: add colorcolumn-workaround for git commits

This commit is contained in:
tastytea 2022-08-08 23:29:17 +02:00
parent ec373c7934
commit 58ee0ade7f
Signed by: tastytea
SSH Key Fingerprint: SHA256:FBkvrOlhq5use1XEttyUGT4bUTDVA1ar9SgIc9P03cM

View File

@ -20,5 +20,9 @@ packer.use {
vim.api.nvim_create_autocmd('FileType', {
pattern = { 'gitcommit', 'gitrebase' },
command = 'startinsert | 1',
callback = function()
-- FIXME: why does the autocmd in settings.lua not set it?
vim.wo.colorcolumn = tostring(vim.o.textwidth)
vim.cmd([[startinsert | 1]])
end
})