Updated the changelog, commands, and hooks docs to be clearer

This commit is contained in:
Justin Frank 2019-03-16 01:09:42 -07:00
parent 87bcf23f3e
commit 93ced79f37
3 changed files with 12 additions and 6 deletions

View File

@ -19,8 +19,8 @@ released versions.
`requires-module` commands that allows for lazily loading language
support files with dependency resolution.
* Added a new hook `ModuleLoad` which is run when a module is loaded, as
now options needed by modules aren't defined until the module is loaded.
* Added a new hook `ModuleLoad` which is run when a module is loaded,
allowing for module specific configuration.
== Kakoune 2019.01.20

View File

@ -315,11 +315,17 @@ but not really useful in that context.
== Module commands
*provide-module* [<switches>] <name> <commands>::
declares a new module that is provided by the given commands. The commands
passed into the module are guaranteed to be run only once.
declares a module *name* that is defined by *commands*. *commands* will be
evaluated as if by source the first time *require-module <name>* is run.
*-override*:::
allow the module to replace and existing one with the same name
*require-module* <name>::
guarantees the <name> module is loaded before continuing command execution
guarantees the commands associated with *name* have been evaluated before
continuing command execution. Fails if *name* has not been defined by a
*provide-module* command. Does nothing if the associated commands have
already been evaluated.
== Multiple commands

View File

@ -181,7 +181,7 @@ name. Hooks with no description will always use an empty string.
Triggered whenever a key is pressed by the user
*ModuleLoad* `module`::
Triggered when a module is loaded
Triggered when a module is evaluated by the first `require-module` call
Note that some hooks will not consider underlying scopes depending on what
context they are bound to be run into, e.g. the `BufWritePost` hook is a buffer