Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show winbar inmediatly after entering #44

Closed
richin13 opened this issue Jul 5, 2022 · 1 comment · Fixed by #157
Closed

Show winbar inmediatly after entering #44

richin13 opened this issue Jul 5, 2022 · 1 comment · Fixed by #157

Comments

@richin13
Copy link

richin13 commented Jul 5, 2022

Hi there! I'm trying to setup the winbar but I'm having an issue to have it shown upon entering.

If I type nvim path/to/file the winbar won't show until I open a new file (using either :e, Telescope or nvim-tree). I'm using the example config from the cookbook with only a few modifications:

local WinBars = {
    init = utils.pick_child_on_condition,
    {   -- Hide the winbar for special buffers
        condition = function()
            return conditions.buffer_matches({
                buftype = { "nofile", "prompt", "help", "quickfix" },
                filetype = { "^git.*", "fugitive" },
            })
        end,
        init = function()
            vim.opt_local.winbar = nil
        end
    },
    {   -- An inactive winbar for regular files
        condition = function()
            return not conditions.is_active()
        end,
        utils.surround({ "", "" }, colors.bg, { hl = { fg = "gray", force = true }, FileNameBlock }),
    },
    -- A winbar for regular files
    utils.surround({ "", "" }, colors.alt_bg, FileNameBlock),
}

And I call require("heirline").setup(StatusLines, WinBars) using VimEnter (if that matters)

Not sure if this is the intended behavior for winbar or if there's something wrong with my config, if you could point to ways to debug my issue I'd greatly appreciate it 🙌🏼

Thank you!

@rebelot rebelot closed this as completed in bbd74de Jul 6, 2022
@rebelot
Copy link
Owner

rebelot commented Jul 6, 2022

That should be fixed now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants