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:
StrawberryTea 2023-10-30 14:36:19 -04:00 committed by Luigi Sartor Piucco
parent 968a897530
commit 365a95de76
No known key found for this signature in database
GPG key ID: 6FF1A01853A47A66
3 changed files with 49 additions and 4 deletions

View file

@ -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))