@@ -161,15 +161,27 @@ MiniDeps.add({
161
161
162
162
``` lua
163
163
{
164
- -- the keymap may be a preset ('default' | 'super-tab' | 'enter') OR a table of keys => command[]
165
- -- when defining your own, no keybinds will be assigned automatically.
166
- -- you may pass a function in the command array where returning true
167
- -- will prevent the next command from running
168
- --
169
- -- The "fallback" command will run the next non-blink keymap.
170
- -- For example, to accept the current completion item with "enter", or create a new line,
171
- -- when the blink window is closed, you would define it as:
172
- -- ['<CR>'] = { 'accept', 'fallback' }
164
+ -- The keymap can be:
165
+ -- - A preset ('default' | 'super-tab' | 'enter')
166
+ -- - A table of keys => command[]
167
+ -- - A table that includes a 'preset' key and custom key mappings
168
+ --
169
+ -- When specifying 'preset' in the keymap table, the custom key mappings are merged with the preset,
170
+ -- and any conflicting keys will overwrite the preset mappings.
171
+ --
172
+ -- Example:
173
+ --
174
+ -- keymap = {
175
+ -- preset = 'default',
176
+ -- ['<cr>'] = { 'select_and_accept', 'fallback' },
177
+ -- },
178
+ --
179
+ -- In this example, the 'default' preset is used, and the `<cr>` key mapping is added or overwrites the existing one from the preset.
180
+ -- When defining your own keymaps without a preset, no keybinds will be assigned automatically.
181
+ --
182
+ -- Available commands:
183
+ -- show, hide, accept, select_and_accept, select_prev, select_next, show_documentation, hide_documentation,
184
+ -- scroll_documentation_up, scroll_documentation_down, snippet_forward, snippet_backward, fallback
173
185
--
174
186
-- "default" keymap
175
187
-- ['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' },
@@ -227,10 +239,6 @@ MiniDeps.add({
227
239
--
228
240
-- ['<C-b>'] = { 'scroll_documentation_up', 'fallback' },
229
241
-- ['<C-f>'] = { 'scroll_documentation_down', 'fallback' },
230
- --
231
- -- available commands:
232
- -- show, hide, accept, select_and_accept, select_prev, select_next, show_documentation, hide_documentation,
233
- -- scroll_documentation_up, scroll_documentation_down, snippet_forward, snippet_backward, fallback
234
242
keymap = ' default' ,
235
243
236
244
accept = {
0 commit comments