Skip to content

Async and refresh questions #487

Discussion options

You must be logged in to vote
  1. Is there an example of the right way to refresh my source?

Refreshing usually happens from either someone pressing R within the Neo-tree window to refresh manually, or automatically in response to events. You can look at the setup function in the init.lua file 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 the filesystem source does this.

I'm actually not sure how :Neotree my_source makes its way to my source's .navigate function or else I'd try to mimic that path to do a refresh more directly.

The commands ar…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ElPiloto
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants