nvim-neo-tree / neo-tree.nvim

Neovim plugin to manage the file system and other tree like structures.
MIT License
3.89k stars 224 forks source link

Add option to config to enable "auto preview" #545

Open miversen33 opened 2 years ago

miversen33 commented 2 years ago

Great work on getting the Preview Mode in place! It would be pretty cool if we could configure Neo-tree to have preview enabled by default instead of having to toggle it on each time we open Neo-tree.

I'm not super sure the work effort on this, so it is likely safe to consider this a "nice to have" low priority ask :)

nyngwang commented 2 years ago

I second this. I'm trying this under the current implementation #546.

mrbjarksen commented 2 years ago

I think it's simplest to add this on a source-by-source basis, like bind_to_cwd and follow_current_file. I just added options in neo-tree-diagnostics (mrbjarksen/neo-tree-diagnostics.nvim@6e4180c27f1dceb30e1e34d12d60e1dab36e7b9b) which could serve as a blueprint.

Edit: There seems to be a bug which somehow slipped by me (mrbjarksen/neo-tree-diagnostics.nvim#18). I'm working on fixing it.

Edit 2: It seems to be fixed now as of mrbjarksen/neo-tree-diagnostics.nvim@9a78e75688a9571136246a9e7b0d7aa01e71b51a.

nyngwang commented 2 years ago

For those who want to use it now for filesystem source, see the comment. Note that it's not perfect, see reason.