utilyre / barbecue.nvim

Visual Studio Code inspired breadcrumbs plugin for the Neovim editor
MIT License
776 stars 31 forks source link

[BUG]: Winbar appears, flickers then disappears #70

Closed willothy closed 1 year ago

willothy commented 1 year ago

Requirements

Expected Behavior

Winbar should stay on-screen as shown in the example gif

Actual Behavior

Appearing then disappearing: https://user-images.githubusercontent.com/38540736/218783030-be32e4ee-4651-4d96-9e0f-e4fedd4f035a.mp4

Flickering (only seems to be visible when cursor is moving) https://user-images.githubusercontent.com/38540736/218788089-c6652569-fd53-492e-9e4b-842defdd8084.mp4

Neovim Version

NVIM v0.9.0-dev-952+g20c9f4b35
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3
Compilation: /usr/bin/cc -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wshadow -Wconversion -Wdouble-promotion -Wmissing-noreturn -Wmissing-format-attribute -Wmissing-prototypes -Wimplicit-fallthrough -Wvla -fno-common -fdiagnostics-color=always -fstack-protector-strong -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_TS_HAS_SET_MATCH_LIMIT -DNVIM_TS_HAS_SET_ALLOCATOR -DINCLUDE_GENERATED_DECLARATIONS -D_GNU_SOURCE -DMIN_LOG_LEVEL=3 -DNVIM_UNIBI_HAS_VAR_FROM -I/home/willothy/vendor/neovim/.deps/usr/include/luajit-2.1 -I/usr/include -I/home/willothy/vendor/neovim/.deps/usr/include -I/home/willothy/vendor/neovim/.deps/usr/include -I/home/willothy/vendor/neovim/.deps/usr/include -I/home/willothy/vendor/neovim/.deps/usr/include -I/home/willothy/vendor/neovim/build/src/nvim/auto -I/home/willothy/vendor/neovim/build/include -I/home/willothy/vendor/neovim/build/cmake.config -I/home/willothy/vendor/neovim/src -I/home/willothy/vendor/neovim/.deps/usr/include -I/home/willothy/vendor/neovim/.deps/usr/include -I/home/willothy/vendor/neovim/.deps/usr/include

(also tried on latest nvim 8.3 available on Zypper, same issue)

Minimal Configuration

local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "cache" }) do
    vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end

--   -- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
    vim.fn.system({
        "git",
        "clone",
        "--filter=blob:none",
        "--single-branch",
        "https://github.com/folke/lazy.nvim.git",
        lazypath,
    })
end
vim.opt.runtimepath:prepend(lazypath)

--                               -- install plugins
local plugins = {
    -- do not remove the colorscheme!
    "folke/tokyonight.nvim",

    {
        "utilyre/barbecue.nvim",
        dependencies = {
            "neovim/nvim-lspconfig",
            "SmiteshP/nvim-navic",
            "kyazdani42/nvim-web-devicons",
        },
        config = function()
            require("barbecue").setup()
        end,
    },
    {
        "nvim-lualine/lualine.nvim",
        dependencies = {
            "kyazdani42/nvim-web-devicons",
        },
        config = function()
            local circle_left = ''
            local circle_right = ''
            require("lualine").setup({
                options = {
                    theme = "tokyonight",
                    always_divide_middle = true,
                    globalstatus = true,
                },
                sections = {
                    -- left side
                    lualine_a = { { 'mode' } },
                    lualine_b = { { 'branch' } },
                    lualine_c = { { 'filename' } },
                    -- right side
                    lualine_x = { { 'encoding' } },
                    lualine_y = { { 'filetype' } },
                    lualine_z = { { 'location' } },
                },
                -- Removing this fixes the issue
                winbar = {
                    -- left side
                    lualine_c = { {} },
                    lualine_a = { {} },
                    lualine_b = { {} },
                    -- right side
                    lualine_x = { {} },
                    lualine_y = { {} },
                    lualine_z = { {} },
                },
            })
        end,
    }
}
require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

-- add anything else here
vim.opt.termguicolors = true
-- do not remove the colorscheme!
vim.cmd([[colorscheme tokyonight]])

Reproduction

  1. Start neovim
  2. Start editing nvim configs
  3. Barbecue flickers on and off or just disappears entirely
utilyre commented 1 year ago

That is not a minimal config. A minimal config is supposed to be run like nvim -u repro.lua and should reproduce the given issue. The one that was given by default is a good place to start.

willothy commented 1 year ago

Sorry about that, I didn't realize that was used for more than info. I'll update the config to be usable.

I would also be open to trying my hand at a PR if it turns out to be a bug, just wasn't sure I should lead with that as I'm new-ish to neovim/open source.

willothy commented 1 year ago

Ok, my bad again this was a config issue. Barbecue was conflicting with lualine's winbar, even though the lualine winbar entries were all set to empty. Removing the lualine winbar config entirely fixed the issue. I'll update the report with the repro file anyways, but feel free to close.

utilyre commented 1 year ago

Glad that it's been fixed :).