kosayoda / nvim-lightbulb

VSCode 💡 for neovim's built-in LSP.
MIT License
783 stars 27 forks source link

Conflict with nvim-tree float window #57

Open LinoWhy opened 10 months ago

LinoWhy commented 10 months ago

Opening nvim-tree in a float window then quit, leads to following error:

E5108: Error executing lua: ...cal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/view.lua:210: WinLeave Autocommands fo r "*": Vim(append):Error executing lua callback: ...are/nvim/lazy/nvim-lightbulb/lua/nvim-lightbulb/init.lua:202: sco ped variable: Invalid buffer id: 18 stack traceback: [C]: in function '__index' ...are/nvim/lazy/nvim-lightbulb/lua/nvim-lightbulb/init.lua:202: in function 'clear_lightbulb' ...e/nvim/lazy/nvim-lightbulb/lua/nvim-lightbulb/config.lua:241: in function <...e/nvim/lazy/nvim-lightbulb/l ua/nvim-lightbulb/config.lua:240> [C]: in function 'nvim_set_current_win' ...cal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/view.lua:210: in function 'close' ...cal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/view.lua:222: in function 'close_this_tab_only' ...cal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/view.lua:235: in function <...cal/share/nvim/lazy/nvim-tre e.lua/lua/nvim-tree/view.lua:231> stack traceback: [C]: in function 'nvim_set_current_win' ...cal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/view.lua:210: in function 'close' ...cal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/view.lua:222: in function 'close_this_tab_only' ...cal/share/nvim/lazy/nvim-tree.lua/lua/nvim-tree/view.lua:235: in function <...cal/share/nvim/lazy/nvim-tre e.lua/lua/nvim-tree/view.lua:231>

It seems that WinLeave autocmd of nvim-tree and nvim-lightbulb have conflicts. Beside, can we use the ignore option in autocmd pattern?

    ignore = {
        -- Filetypes to ignore.
        -- Example: {"neo-tree", "lua"}
        ft = {},
    }, 
mushfiqRabbi commented 9 months ago

Any update on this? I am facing a similar issue. Update: Setting "hide_in_unfocused_buffer = false", fixes the issue.