feat(corfu): more CAPFs and ergonomy changes
Add CAPFs from cape: - `cape-dabbrev`; - `cape-elisp-block`; - `cape-file`; Fix some CAPFs via cape: - Make non-exclusive, purified and silent `pcomplete-completions-at-point`; - Make non-exclusive and non-interruptable `lsp-completion-at-point`; - Make non-exclusive `eglot-completion-at-point`; - Make non-exclusive `comint-completion-at-point`; Fix and improve keybindings: - Smart `DEL`; Add depth to CAPFs, allowing ordering to be adjustable.
This commit is contained in:
parent
968a897530
commit
365a95de76
3 changed files with 49 additions and 4 deletions
|
@ -468,7 +468,13 @@ Continues comments if executed from a commented line. Consults
|
|||
[backtab] #'corfu-previous
|
||||
"TAB" #'corfu-next
|
||||
[tab] #'corfu-next))
|
||||
(let ((cmds-ret
|
||||
(let ((cmds-del
|
||||
`(menu-item "Reset completion" corfu-reset
|
||||
:filter ,(lambda (cmd)
|
||||
(when (and (>= corfu--index 0)
|
||||
(eq corfu-preview-current 'insert))
|
||||
cmd))))
|
||||
(cmds-ret
|
||||
`(menu-item "Insert completion DWIM" corfu-insert
|
||||
:filter ,(lambda (cmd)
|
||||
(interactive)
|
||||
|
@ -488,6 +494,8 @@ Continues comments if executed from a commented line. Consults
|
|||
(t cmd))))))
|
||||
(map! :when (modulep! :completion corfu)
|
||||
:map corfu-map
|
||||
[backspace] cmds-del
|
||||
"DEL" cmds-del
|
||||
:gi [return] cmds-ret
|
||||
:gi "RET" cmds-ret))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue