utilyre / barbecue.nvim

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

Conflicts with anuvyklack/windows.nvim after restoring a multi-splits session. #38

Closed nyngwang closed 1 year ago

nyngwang commented 1 year ago

Description

As title. I got the error message:

Error  01:51:19 msg_show.lua_error Error executing vim.schedule lua callback: ...l/share/nvim/lazy/windows.nvim/lua/windows/lib/frame.lua:98: attempt to index local 'curwinLeaf' (a nil value)
stack traceback:
    ...l/share/nvim/lazy/windows.nvim/lua/windows/lib/frame.lua:98: in function 'autowidth'
    .../nvim/lazy/windows.nvim/lua/windows/calculate-layout.lua:27: in function 'autowidth'
    ...l/share/nvim/lazy/windows.nvim/lua/windows/autowidth.lua:40: in function ''
    vim/_editor.lua: in function ''
    vim/_editor.lua: in function <vim/_editor.lua:0>

If I disable barbecue.nvim then the error is gone. (I reported this in anuvyklack/windows.nvim too, but it looks like the author has abandoned the issues section since there are some issues created in Sep. without any reply.)

Reproduce

To reproduce, you can use my config (assuming you use packer.nvim):

use {
  'anuvyklack/windows.nvim',
  requires = {
    'anuvyklack/middleclass',
    'anuvyklack/animation.nvim'
  },
  config = function()
    vim.o.winwidth = 10
    vim.o.winminwidth = 10
    vim.o.equalalways = false
    require('windows').setup {
      autowidth = {
        enable = true, -- I need to set it `false` to get rid of the error.
      },
      ignore = {
        filetype = { 'neo-tree', 'lazy', 'noice' },
      }
    }
  end
}

https://user-images.githubusercontent.com/24765272/209852868-a8e2d7e1-c960-4a11-9cc2-f0c75a448d5f.mov

utilyre commented 1 year ago

Can't reproduce. I tried opening two buffers, splitting them in two, and saving session :mksession some.vim. Then I opened nvim via nvim -S some.vim and I get no errors. Could you add more details.

nyngwang commented 1 year ago

Could you add more details.

@utilyre In my DEMO I restore the session where I created more than 1 tabpage. Might be related... If still cannot reproduce then I have no idea, since the error message seems to point out that the culprit is related to a window-plugin. The tabpage management tool I'm using is Tabby but I guess this is not related.

utilyre commented 1 year ago

Please provide a minimal config according to lazy.nvim's Wiki.

nyngwang commented 1 year ago

@utilyre Hi, it turns out this is a wrong report. Apologies. The problem is still happening after some standalone testing with windows.nvim without barbecue.nvim. Closing...