add autocommand to disable git-blame in netrw
This commit is contained in:
@@ -1,13 +1,22 @@
|
|||||||
return {
|
return {
|
||||||
'f-person/git-blame.nvim',
|
'f-person/git-blame.nvim',
|
||||||
config = function()
|
config = function()
|
||||||
gitblame = require('gitblame')
|
local gitblame = require('gitblame')
|
||||||
gitblame.setup({
|
gitblame.setup({
|
||||||
enabled = true,
|
enabled = true,
|
||||||
date_format = '%r'
|
date_format = '%r'
|
||||||
})
|
})
|
||||||
vim.keymap.set("n", "<leader>gbt", function ()
|
vim.keymap.set("n", "<leader>gbt", function()
|
||||||
gitblame.toggle()
|
gitblame.toggle()
|
||||||
end)
|
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
|
end
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user