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

The plugin cannot work well when the window might be full-screen. #63

Closed nullptr-yxw closed 3 months ago

nullptr-yxw commented 9 months ago

The edgy.nvim cannot work well with windows which can be full-screen. For example, while starting the neovim with a directory, netrw or nvimtree will be full-screen and the edgy.nvim cannot work well with them.

The minimal init file to reproduce the bug is:

-- save as repro.lua
-- run with nvim -u repro.lua
-- DO NOT change the paths
local root = vim.fn.fnamemodify("./.repro", ":p")

-- set stdpaths to use .repro
for _, name in ipairs({ "config", "data", "state", "runtime", "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 = {
        -- add any other plugins here
        {
                "folke/edgy.nvim",
                opts = {
                        left = {
                                {
                                        ft = "netrw",
                                },
                        },
                },
        },
}
require("lazy").setup(plugins, {
        root = root .. "/plugins",
})

Then open a directory with neovim

> mkdir test
> nvim -u repro.lua test

The neovim and netrw will be opened normally, but the cursor cannot move as expected, and I cannot open a file by netrw as well. nvimtree has the similar problem too.

github-actions[bot] commented 3 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

folke commented 3 months ago

cant reproduce