nvim-tree / nvim-tree.lua

A file explorer tree for neovim written in lua

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Open on setup not working

ManInTheSuit opened this issue · comments

nvim-tree-cfg.txt
Open on setup is not working, but toggling e.g. "auto-close" changes behaviour as expected.

Everything seems to be working correctly as I need it to, except this.

It works when I open blank neovim file (neovim in terminal), but not as expected (doesn't show the blank file)

commented

i do not understand what does not work for you, please provide:

  • operating system
  • neovim version
  • nvim-tree version
    and better detail your issue, 'not working' is not something i can reproduce.

OS: Solus Budgie, latest update
Nvim v0.5.1
nvim-tree latest PlugInstall update

When I use the following setting:
open_on_setup = true
open_on_setup is not working as expected.
What I expect:
Open neovim tree along the nvim editor window any time I open a file in nvim.
What happens:

  1. When I open an existing file in neovim, tree is not present by default. example
  2. When I open a blank file (nvim in terminal or launching nvim with a launcher), nvim tree is the only window that opens in the window. example

I have attached init and lsp-tree vim files
nvim.zip

What you expect is not the behavior described in the documentation for the open_on_setup setting and is not an issue with NvimTree.

*nvim-tree.open_on_setup*
- |open_on_setup|: will automatically open the tree when running setup if current
  buffer is a directory, is empty or is unnamed.
  type: `boolean`
  default: `false`

There is a different setting that does what you want.

Read through this document.

commented

closing this, the intended behavior is unrelated to open_on_setup.

What you expect is not the behavior described in the documentation for the open_on_setup setting and is not an issue with NvimTree.

*nvim-tree.open_on_setup*
- |open_on_setup|: will automatically open the tree when running setup if current
  buffer is a directory, is empty or is unnamed.
  type: `boolean`
  default: `false`

There is a different setting that does what you want.

Read through this document.

I see that now, reading the doc.

But isn't then

update_to_buf_dir = { enable = true, auto_open = true, },

supposed to do it? For me, it isn't doing it.

What you expect is not the behavior described in the documentation for the open_on_setup setting and is not an issue with NvimTree.

*nvim-tree.open_on_setup*
- |open_on_setup|: will automatically open the tree when running setup if current
  buffer is a directory, is empty or is unnamed.
  type: `boolean`
  default: `false`

There is a different setting that does what you want.

Read through this document.

I desire the same behaviour, but have not been able to locate a setting that does what I want. It doesn't sound like @ManInTheSuit has been able to locate it either.

Perhaps this could be documented more clearly?

commented

I agree some option names are not very good. I have plans to make the documentation better once i've done all the refactorings i have planned.