diff --git a/doc/pages/changelog.asciidoc b/doc/pages/changelog.asciidoc index 6c7ab63d..206a3c5a 100644 --- a/doc/pages/changelog.asciidoc +++ b/doc/pages/changelog.asciidoc @@ -15,13 +15,20 @@ released versions. * `edit -scratch` with no buffer name will create a new scratch buffer with a unique autogenerated name. +* Introduced a module system using the `provides-module` and + `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. + == Kakoune 2019.01.20 * `auto_complete` has been renamed to `autocomplete` for more consistency. * Start of a builtin key parser in the ncurses ui bypassing - the ncurses one. Can be favored by setting the ui option + the ncurses one. Can be favored by setting the ui option `ncurses_builtin_key_parser` to `true`. * Right clicks extend the current selection, the control modifier allows diff --git a/doc/pages/commands.asciidoc b/doc/pages/commands.asciidoc index 62b80818..9f5e238e 100644 --- a/doc/pages/commands.asciidoc +++ b/doc/pages/commands.asciidoc @@ -312,6 +312,15 @@ but not really useful in that context. *debug* {info,buffers,options,memory,shared-strings,profile-hash-maps,faces,mappings}:: print some debug information in the *\*debug** buffer +== Module commands + +*provide-module* [] :: + declares a new module that is provided by the given commands. The commands + passed into the module are guaranteed to be run only once. + +*require-module* :: + guarantees the module is loaded before continuing command execution + == Multiple commands Commands (c.f. previous sections) can be chained, by being separated either diff --git a/doc/pages/hooks.asciidoc b/doc/pages/hooks.asciidoc index a0f00bf4..d91781fb 100644 --- a/doc/pages/hooks.asciidoc +++ b/doc/pages/hooks.asciidoc @@ -180,6 +180,9 @@ name. Hooks with no description will always use an empty string. *RawKey* `key`:: Triggered whenever a key is pressed by the user +*ModuleLoad* `module`:: + Triggered when a module is loaded + 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 hook, and will not consider the `window` scope.