add autocommand to disable git-blame in netrw

This commit is contained in:
2024-06-06 21:25:03 +03:00
parent e4248684d7
commit 51b38e8245

View File

@@ -1,13 +1,22 @@
return {
'f-person/git-blame.nvim',
config = function()
gitblame = require('gitblame')
local gitblame = require('gitblame')
gitblame.setup({
enabled = true,
date_format = '%r'
})
vim.keymap.set("n", "<leader>gbt", function ()
vim.keymap.set("n", "<leader>gbt", function()
gitblame.toggle()
end)
local CrentistGitBlame = vim.api.nvim_create_augroup("CrentistGitBlame", {})
vim.api.nvim_create_autocmd({ "FileType" }, {
group = CrentistGitBlame,
pattern = "netrw",
callback = function()
gitblame.disable()
end,
})
end
}