nvim-tree.lua
nvim-tree.lua copied to clipboard
When new buffer opens from tree file list, it creates half-split ignoring width setting
Description
When on the screen there is only a file tree, upon opening the file it opens a tab on the right half of the window, and nvim-tree takes a left half, even with width setting being set. Toggling nvim-tree twice (close-open) shrinks it to a width-value width.
Neovim version
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Operating system and version
macOS 12.4
nvim-tree version
08ab346
Minimal config
-
Steps to reproduce
- Open any directory with nvim
- Select a file within nvim-tree sidebar
- Hit Enter
Expected behavior
Opened tab takes full-width - nvim-tree-width
width, and nvim-tree takes nvim-tree-width
width
Actual behavior
Opened tab takes 50% width, and nvim-tree
50% width
This sounds like a bug.
Please create a minimal config nvt-min.lua
that we may use to replicate and (fix or provide a workaround for).
@alex-courtis it's a clean lunarvim config
Lunarvim is extremely far from a minimal config. Open the link Alex gave you.
I think I'm facing the same problem
Steps to reproduce the issue:
- Open directory as the following:
nvim .
- Then open any file (
Enter
oro
). -
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by nixbld
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/nix/store/jnfqzl7lzqshbqfm9mkl27024nsbcgvz-neovim-unwrapped-0.7.2/share/nvim
"
Run :checkhealth for more info
P.S. I tried neovim with a minimal configuration (only nvim-tree)
I found a workaround to use <C-o>
to open the first file. But it would be great if o
didn't push sidebar to the right.
https://github.com/kyazdani42/nvim-tree.lua/pull/1594 fixed my problem :)
Thanks @pleshevskiy , merged.
@flppv please update nvim-tree.lua and see if it resolves the issue.
@alex-courtis unfortunately I got rid from LunarVim where this bug occured for me, and started using my own clean config, I hadn't issue with width there, but I had with tree changing side to right, which is resolved with new update. I assume I can close this issue
started using my own clean config
Fantastic! LunarVim does do a lot...