diff options
author | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-11-10 11:06:53 -0500 |
---|---|---|
committer | mitchell <70453897+orbitalquark@users.noreply.github.com> | 2020-11-10 11:06:53 -0500 |
commit | 269f42273129fcfbaf67e157d8784666e0c65c9c (patch) | |
tree | 4e5e9c7568edd3834f0585f40bcf609a68ef561e /docs/api.md | |
parent | 87a11d65ee576d965bcf432e878f191512e46bdd (diff) |
Fill `keys` and `snippet` tables with language-specific tables on init.
This allows users and language modules to easily add bindings and snippets
without stepping on each other.
Diffstat (limited to 'docs/api.md')
-rw-r--r-- | docs/api.md | 32 |
1 files changed, 5 insertions, 27 deletions
diff --git a/docs/api.md b/docs/api.md index 8405ff84..f9b8cd77 100644 --- a/docs/api.md +++ b/docs/api.md @@ -299,13 +299,11 @@ C++ module might have a feature to add a ';' to the end of the current line and insert a new line. This command could be bound to the `Shift+Enter` (`⇧↩` on macOS | `S-Enter` in the terminal version) key for easy access: - keys.cpp = { - ['s\n'] = function() - buffer:line_end() - buffer:add_text(';') - buffer:new_line() - end - } + keys.cpp['shift+\n'] = function() + buffer:line_end() + buffer:add_text(';') + buffer:new_line() + end When defining key bindings for other commands, you may make use of a `Ctrl+L` (`⌘L` on macOS | `M-L` in the terminal version) keychain. Traditionally this @@ -352,16 +350,6 @@ Whether or not to include snippets in autocompletion lists. ### Tables defined by `_M.ansi_c` -<a id="keys.ansi_c"></a> -#### `keys.ansi_c` - -Table of C-specific key bindings. - -<a id="snippets.ansi_c"></a> -#### `snippets.ansi_c` - -Table of C-specific snippets. - <a id="_M.ansi_c.tags"></a> #### `_M.ansi_c.tags` @@ -387,16 +375,6 @@ Whether or not to include snippets in autocompletion lists. ### Tables defined by `_M.lua` -<a id="keys.lua"></a> -#### `keys.lua` - -Container for Lua-specific key bindings. - -<a id="snippets.lua"></a> -#### `snippets.lua` - -Container for Lua-specific snippets. - <a id="_M.lua.expr_types"></a> #### `_M.lua.expr_types` |