Skip to content

When new buffer opens from tree file list, it creates half-split ignoring width setting #1522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
flppv opened this issue Aug 20, 2022 · 9 comments
Labels
awaiting feedback bug Something isn't working

Comments

@flppv
Copy link

flppv commented Aug 20, 2022

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

  1. Open any directory with nvim
  2. Select a file within nvim-tree sidebar
  3. 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

@flppv flppv added the bug Something isn't working label Aug 20, 2022
@alex-courtis
Copy link
Member

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).

@flppv
Copy link
Author

flppv commented Aug 25, 2022

@alex-courtis it's a clean lunarvim config

@0styx0
Copy link

0styx0 commented Aug 25, 2022

Lunarvim is extremely far from a minimal config. Open the link Alex gave you.

@pleshevskiy
Copy link

pleshevskiy commented Sep 20, 2022

I think I'm facing the same problem

Steps to reproduce the issue:

  1. Open directory as the following:
nvim .
  1. Then open any file (Enter or o).
  2. image
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

My neovim configuration

nvim-tree configuration

P.S. I tried neovim with a minimal configuration (only nvim-tree)

@pleshevskiy
Copy link

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.

@pleshevskiy
Copy link

#1594 fixed my problem :)

@alex-courtis
Copy link
Member

Thanks @pleshevskiy , merged.

@flppv please update nvim-tree.lua and see if it resolves the issue.

@flppv
Copy link
Author

flppv commented Sep 22, 2022

@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

@flppv flppv closed this as completed Sep 22, 2022
@alex-courtis
Copy link
Member

started using my own clean config

Fantastic! LunarVim does do a lot...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
awaiting feedback bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants