neogit
neogit copied to clipboard
Option to run checktime to reload buffers
Is your feature request related to a problem? Please describe. I noticed this when discarding a hunk and the buffer holding the file in question didn't update.
Describe the solution you'd like I would like a configuration option to enable this automatic update of buffers behaviour
Describe alternatives you've considered I tried to make an autocmd that solves this based on NeogitStatusRefreshed but it breaks Neogits status view instead.
vim.api.nvim_create_autocmd("User", {
pattern = "NeogitStatusRefreshed",
command = "checktime"
})
Ok this seems to work.
vim.api.nvim_create_autocmd("User", {
pattern = "NeogitStatusRefreshed",
callback = function()
vim.cmd("set autoread | checktime")
end
})
I would love to see a feature like this implemented in neogit natively. Neogit is the only git plugin I know of that doesn't have this by default.