folke / edgy.nvim

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

bug: Increase, decrease width or pre-defining width doesn't work with the default "left" bar. #74

Closed agoodfellow123 closed 2 days ago

agoodfellow123 commented 3 months ago

Did you check docs and existing issues?

Neovim version (nvim -v)

0.9.5 Release

Operating system/version

Arch Linux

Describe the bug

Hello, I'm new to nvim and its plugins. I'm using the lazynvim distribution of nvim. I installed all the optional packages for edgy.nvim and put the default config from here: http://www.lazyvim.org/extras/ui/edgy. There are two problems with that but I will focus on one in this issue.

here is a little snippet:

        {
          title = "Neo-Tree",
          ft = "neo-tree",
          filter = function(buf)
            return vim.b[buf].neo_tree_source == "filesystem"
          end,
          pinned = true,
          open = function()
            vim.api.nvim_input("<esc><space>e")
          end,
          size = { height = 0.5, width = 10},
        },

In that snippet width = 10 does nothing. Also doing this:

left = {
    size = 30 
},

Does nothing as well. Using the default keybind space + ctrl + w + < Does nothing as well, but for example same thing for height works as intended.

As a side issue that I think might be related to this: "bottom" edgebar doesn't work at all despite require("edgy").open("bottom"). I'm not sure if they are related but if there is a problem with width related code it may not be able to display it correctly.

Steps To Reproduce

  1. Install lazynvim
  2. Make sure everything is up to date
  3. Copy the default edgy config file
  4. Press "space + c + e"
  5. Press "space + ctrl + w + <"

Expected Behavior

Neo-tree's width decreases or increases.

Repro

-- I didn't understand how to run edge-nvim with this config so I couldn't do anything.

-- 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/edgy.nvim",
  -- add any other plugins here
}
require("lazy").setup(plugins, {
  root = root .. "/plugins",
})

vim.cmd.colorscheme("tokyonight")
-- add anything else here
github-actions[bot] commented 3 days 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 2 days ago

check the docs. You need to manually bind resizing.