Moved neogit autocmds to nvim-tree
Signed-off-by: Taken <taken@mairimashita.org>
This commit is contained in:
@@ -1,33 +1,9 @@
|
|||||||
local autocmd = vim.api.nvim_create_autocmd
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
local augroup = vim.api.nvim_create_augroup
|
local augroup = vim.api.nvim_create_augroup
|
||||||
-- Groups
|
-- Groups
|
||||||
-- local neogitCmds = augroup("MyCustomNeogitEvents", { clear = true })
|
|
||||||
local nvimhelp = augroup("help_window_right", {})
|
local nvimhelp = augroup("help_window_right", {})
|
||||||
local mkdirrun = augroup("MkdirRun", { clear = true })
|
local mkdirrun = augroup("MkdirRun", { clear = true })
|
||||||
|
|
||||||
-- 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", {
|
autocmd("BufWinEnter", {
|
||||||
group = nvimhelp,
|
group = nvimhelp,
|
||||||
pattern = { "*.txt" },
|
pattern = { "*.txt" },
|
||||||
|
|||||||
@@ -24,5 +24,31 @@ return {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local autocmd = vim.api.nvim_create_autocmd
|
||||||
|
local augroup = vim.api.nvim_create_augroup
|
||||||
|
local neogitCmds = augroup("MyCustomNeogitEvents", { clear = true })
|
||||||
|
|
||||||
|
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,
|
||||||
|
})
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user