Hide/show winbar when Diffview opened/closed #993
Answered
by
lucasrabiec
lucasrabiec
asked this question in
Q&A
-
I want to show Diffview's winbar but it is overwritten by Lualine's winbar. How can I hide my custom lualine's winbar when entering a Diffview plugin and show it again on leaving Diffview? I tried make autocmd: local DiffViewGroup = vim.api.nvim_create_augroup("DiffviewGroup", { clear = true })
vim.api.nvim_create_autocmd("User", {
callback = function()
require("lualine").hide({
place = { "winbar" },
unhide = true,
})
end,
pattern = "DiffviewViewOpened",
group = DiffViewGroup,
})
PS I am using LazyVim. |
Beta Was this translation helpful? Give feedback.
Answered by
lucasrabiec
Mar 14, 2023
Replies: 1 comment
-
I figured it out, unhide needs to be set to Here are autocmd for others struggling with similar problem: local DiffViewGroup = vim.api.nvim_create_augroup("DiffviewGroup", { clear = true })
vim.api.nvim_create_autocmd("User", {
callback = function()
require("lualine").hide({
place = { "winbar" },
unhide = false,
})
end,
pattern = "DiffviewViewOpened",
group = DiffViewGroup,
})
vim.api.nvim_create_autocmd("User", {
callback = function()
require("lualine").hide({ unhide = true })
end,
pattern = "DiffviewViewClosed",
group = DiffViewGroup,
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
lucasrabiec
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I figured it out, unhide needs to be set to
false
, now it works.Here are autocmd for others struggling with similar problem: