Modifing config

Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
2023-08-20 22:12:51 +02:00
parent d33475f518
commit aa8223b7a1
6 changed files with 19 additions and 32 deletions

View File

@@ -0,0 +1,36 @@
local autocmd = vim.api.nvim_create_autocmd
local augroup = vim.api.nvim_create_augroup
-- Groups
local neogitCmds = augroup('MyCustomNeogitEvents', { clear = true })
local nvimhelp = augroup("help_window_right", {})
-- Neogit nvim tree refresh
autocmd('User', {
pattern = 'NeogitPushComplete',
group = neogitCmds,
callback = function()
require('nvim-tree.api').tree.reload()
end,
})
autocmd('User', {
pattern = 'NeogitPullComplete',
group = neogitCmds,
callback = function()
require('nvim-tree.api').tree.reload()
end,
})
autocmd('User', {
pattern = 'NeogitFetchComplete',
group = neogitCmds,
callback = function()
require('nvim-tree.api').tree.reload()
end,
})
autocmd("BufWinEnter", {
group = nvimhelp,
pattern = { "*.txt" },
callback = function()
if vim.o.filetype == 'help' then vim.cmd.wincmd("L") end
end
})