diff options
| author | Justin Frank <justinpfrank@protonmail.com> | 2019-03-16 01:09:42 -0700 |
|---|---|---|
| committer | Justin Frank <justinpfrank@protonmail.com> | 2019-04-08 17:06:56 -0700 |
| commit | 93ced79f37fab2cc6843d9c8f097f577b69aad9a (patch) | |
| tree | a096ba0b418c94e533569ac4568d1a4a0500efbf | |
| parent | 87bcf23f3ef60d292aba6043087d91cf510abe38 (diff) | |
Updated the changelog, commands, and hooks docs to be clearer
| -rw-r--r-- | doc/pages/changelog.asciidoc | 4 | ||||
| -rw-r--r-- | doc/pages/commands.asciidoc | 12 | ||||
| -rw-r--r-- | doc/pages/hooks.asciidoc | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/doc/pages/changelog.asciidoc b/doc/pages/changelog.asciidoc index 206a3c5a..61b2af89 100644 --- a/doc/pages/changelog.asciidoc +++ b/doc/pages/changelog.asciidoc @@ -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 diff --git a/doc/pages/commands.asciidoc b/doc/pages/commands.asciidoc index 9f5e238e..c9c84b96 100644 --- a/doc/pages/commands.asciidoc +++ b/doc/pages/commands.asciidoc @@ -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 diff --git a/doc/pages/hooks.asciidoc b/doc/pages/hooks.asciidoc index d91781fb..2615bc52 100644 --- a/doc/pages/hooks.asciidoc +++ b/doc/pages/hooks.asciidoc @@ -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 |
