Skip to content

Hide/show winbar when Diffview opened/closed #993

Answered by lucasrabiec
lucasrabiec asked this question in Q&A
Discussion options

You must be logged in to vote

I figured it out, unhide needs to be set to false, now it works.

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,
})

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lucasrabiec
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant