Recommendations for using provide-module?

A nagging doubt about the provide-module command.

  1. I understand that this command improves Kakoune’s starting time when a script executes (or different scripts execute) commands that rely on shell calls.

  2. I also imagine that this command improves code organization when a script requires other scripts for running successfully (in this case, provide-module avoids code duplication and marks script dependencies explicitly).

Aside from these two cases, are there some opinions/recommendations about when to use provide-module? Sometimes I feel there is little to gain from it.

1 Like

that’s my understanding as well, those are the two use cases. Kakoune’s rc uses both.
In many cases neither is needed, especially in private configuration

1 Like

Also it doesn’t really provide a way how to unload or redefine a module, so seems mostly like a mechanism to organize the loading of plugins/components.

1 Like