add BufEnter autocmd for fugitive and gitcommit

This commit is contained in:
2022-04-09 22:35:42 +03:00
parent 81bc1b9bdb
commit 5a2fe6b8ac

View File

@@ -15,3 +15,19 @@ vim.api.nvim_create_autocmd("BufEnter", {
vim.cmd(":checktime")
end,
})
vim.api.nvim_create_autocmd("BufEnter", {
pattern = "*",
group = group,
callback = function()
local ft = vim.bo.filetype
if ft == "fugitive" then
vim.wo.colorcolumn = ""
end
if ft == "gitcommit" then
vim.wo.colorcolumn = "50"
end
end,
})