-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rplugin: cache registrations in 'shada' file #4439
Comments
Also, I wonder if the logic of finding rplugin files/packages, and later, finding changes to rplugin files to remove the need for |
The whole point of having A way to remove the need for The main job of this daemon would be to keep track of all remote plugins in all rtp directories across all nvim instances, so nvim startup process becomes something like this:
Since the daemon(which could be a libuv program using the fs watcher API) is always keeping track of remote plugins files/directories, new nvim instances will always get up to date rplugin information without needing Anothe nice thing about this daemon is that it could notify running nvim instances when a rplugin changes. Imagine this:
|
What about the idea of extending Also, in general, could we avoid a daemon and instead use a p2p strategy using leader election ? This would be more robust than a daemon. I've never heard of any application doing this for local communication, but I've also never heard anyone say why it would be a bad idea: from a high-level, it seems to me that it would avoid the various problems associated with detecting a zombie daemon, restarting the daemon, etc. (solutions for that are platform-specific; implementing "raft" protocol internal to nvim would be cross-platform). |
The question of who decides what is a rplugin file is independent of when the rplugin host needs to start. We could start the host when any file in the rplugin tree is newer than the host's shada timestamp. Proper shada synchronization will ensure that only happens at most once per file update. |
We can achieve that by having "remote" plugins define their setup just like any other plugin, in a
Why does the plugin host (aka API client) need to detect changes at runtime?
#27949 proposes something like that, but we can ignore the "daemon" part initially. Instead we just need an easy way for plugins to start an API client and point it to a module. |
followup to #4438 (comment)
Also mentioned there: extend
:helptags
to eliminate:UpdateRemotePlugins
.The text was updated successfully, but these errors were encountered: