nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

how to fix nvim-tree width and side?

LollipopFt opened this issue · comments

when i first open nvim-tree, it is on the left with a certain width.
image
when i open a file, it can be seen that it still remains:
image
when i do :bw on the code, it closes the window and fully exposes nvim-tree:
image
as you can see, there is still a file buffer on top, so i switch to that with :b:
image
here's the problem: nvim-tree now moves to the right, and takes up half the space. how do i fix it to how it was in the first image?

commented

could you provide your configuration ?
maybe you need to
require'nvim-tree'.setup { view = { side = 'left', width = 30 } } which is the default.

Same problem.

I have

require"nvim-tree".setup{
  view = {
    auto_resize = true,
    side = "left",
  }
}

in my init.lua

auto_resize = true solved the width problem, but side = "left" doesn't solve the side problem.

commented

Wasn't able to reproduce, and i lack informations. Closing this, if this happens again just ping me with a proper configuration and reproducible steps :)