Awesome new features: follow and libuv filesystem watcher #68
Replies: 5 comments 2 replies
-
I have just tested both features and they are fantastic. The follower is very handy to keep an eye on where you are, particularly if you're switching back and forth files in very dissimilar subfolders (e.g. kernel). The file watcher essentially removes the infamous manual |
Beta Was this translation helpful? Give feedback.
-
Just realized that I haven't tried |
Beta Was this translation helpful? Give feedback.
-
Yes, it has also been released to v1.x. I'm going to make this the default option in 2.0. |
Beta Was this translation helpful? Give feedback.
-
Thanks for implicitly explaining that the config will work as we expect if we just give it a set of small overridden options like this. I have a similar question for every lua nvim plugin in existence since many consume huge config structures. I would prefer not to copy a snapshot of defaults presented in readmes since these tend to get very stale over time as plugins evolve. So, I'd like to ask, is this how most of them work? Is there perhaps some idiomatic lua code that is usually used to perform the object merge operation that I could try to grep for for a given plugin to see if I can safely just specify a subset of config that I want to set? Thanks. Really looking forward to enabling both of these features by the way. They are going to go a long way to make neovim superior to other tools. |
Beta Was this translation helpful? Give feedback.
-
Note for anyone in the same boat as me. the cursorline plugin Since I don't mind and want the native cursorline back just make sure if you use this plugin to setup |
Beta Was this translation helpful? Give feedback.
-
There are two new features for the filesystem source that I am really excited about but are opt-in right now.
The first is
follow_current_file
(#45 ) which will keep the tree focused on your current file as you navigate in ways outside of Neo-tree, such as with Telescope, Harpoon, or things like b#. Thanks to @ioreshnikov for suggesting this! I didn't realize how much I would like it until I started using it myself.The second is
use_libuv_file_watcher
which will use nvim's libuv integration to watch the directories currently open in the tree and refresh whenever something is changed. Without this, we relied on autocmds like BufWritePost to detect changes. The problem with the autocmds is they only fire in response to you doing something within this nvim instance, and it completely misses all other ways the files might have been changed. Using libuv, we will catch all changes. Examples of what this would catch might be adding, deleting, or moving files from the terminal, or another vim instance, or checking out a different branch with git, etc.To enable both of these features, add these options to your config:
If you try out these features, please post back here to let me know what you think!
Beta Was this translation helpful? Give feedback.
All reactions