folke / edgy.nvim

Easily create and manage predefined window layouts, bringing a new edge to your workflow
Apache License 2.0
839 stars 17 forks source link

bug: Edgy neotree & tabs #82

Closed DrummyFloyd closed 2 months ago

DrummyFloyd commented 4 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.10

Operating system/version

ArchLinux

Describe the bug

come from here

issue on switch tab with neotree opened

   Error  12:40:01 AM notify.error edgy.nvim ...onnet/.local/share/nvim/lazy/edgy.nvim/lua/edgy/util.lua:70: ...et/.local/share/nvim/lazy/edgy.nvim/lua/edgy/edgebar.lua:207: Edgy: Failed to layout windows.
Vim:E957: Invalid window number
{
  last = "neo-tree",
  win = "edgy"
}

Steps To Reproduce

  1. open neotree
  2. open file in first tab
  3. back to neo tree=> happend also when neotree is extands with e command (already started to flickering)
  4. open new tab <leader>TabTab
  5. open file in second tab within neotree open
  6. back to first tab <leader>Tab+f

to fix this error i need to close neotree from first Tab, then clean all notification from notify

Expected Behavior

shoudl not have any error message of issue of flickering with edgy

Repro

-- DO NOT change the paths and don't remove the colorscheme
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", "https://github.com/folke/lazy.nvim.git", lazypath })
end
vim.opt.runtimepath:prepend(lazypath)

-- install plugins
local plugins = {
    "folke/tokyonight.nvim",
    "folke/LazyVim",
    { "LazyVim/LazyVim", import = "lazyvim.plugins" },
    { import = "lazyvim.plugins.extras.ui.edgy" },
    -- add any other plugins here
}
require("lazy").setup(plugins, {
    root = root .. "/plugins",
})

vim.cmd.colorscheme "tokyonight"
-- add anything else here
gj86 commented 3 months ago

Same bug happens with my config also. But the bug doesn't occur if I open Edgy Window instead of Neotree directly.

require('edgy').open('left')

This opens the left pane of Edgy with Neotree in it. After that if I create/switch tab no error occurs.

Edit: I have a complicated TabPage setup with tab scoped buffers (with session restore). But no error occurs when navigating tabpages if I open Edgy instead of Neotree Directly.

folke commented 2 months ago

neo-tree's e is not supported with edgy. And edgy can't make all setups work. Won't fix