From 269f42273129fcfbaf67e157d8784666e0c65c9c Mon Sep 17 00:00:00 2001
From: mitchell <70453897+orbitalquark@users.noreply.github.com>
Date: Tue, 10 Nov 2020 11:06:53 -0500
Subject: 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.
---
docs/api.md | 32 +++++---------------------------
1 file changed, 5 insertions(+), 27 deletions(-)
(limited to 'docs/api.md')
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`
-
-#### `keys.ansi_c`
-
-Table of C-specific key bindings.
-
-
-#### `snippets.ansi_c`
-
-Table of C-specific snippets.
-
#### `_M.ansi_c.tags`
@@ -387,16 +375,6 @@ Whether or not to include snippets in autocompletion lists.
### Tables defined by `_M.lua`
-
-#### `keys.lua`
-
-Container for Lua-specific key bindings.
-
-
-#### `snippets.lua`
-
-Container for Lua-specific snippets.
-
#### `_M.lua.expr_types`
--
cgit v1.2.3