Async and refresh questions #487
-
|
Hello again, I've finally gotten some time to work on another custom source and I had a few questions.
As always, thanks for your time and for making this awesome plugin. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Refreshing usually happens from either someone pressing
The commands are defined in the neo-tree.nvim/lua/neo-tree/command/init.lua Lines 14 to 40 in 3c70bb4
The neo-tree.nvim/lua/neo-tree/git/status.lua Line 203 in 3c70bb4 It uses Plenary's Job for the async part. The git code is extra complicated because there are so many edge cases and we support showing status diffed to any arbitrary branch. |
Beta Was this translation helpful? Give feedback.
Refreshing usually happens from either someone pressing
Rwithin the Neo-tree window to refresh manually, or automatically in response to events. You can look at thesetupfunction in theinit.luafile of any other source to see examples of subscribing to events. You can also use file watchers to refresh when a file is changed. That is more complicated and you have to make sure you unwatch folders when you are done. Only thefilesystemsource does this.The commands ar…