dev: merge branch 'pr7002' into emenel
This commit is contained in:
commit
f56395956a
4 changed files with 52 additions and 96 deletions
|
@ -459,52 +459,42 @@ Continues comments if executed from a commented line. Consults
|
|||
"C-s" command))
|
||||
|
||||
(map! :when (modulep! :completion corfu)
|
||||
:after corfu
|
||||
(:map corfu-mode-map
|
||||
:when (modulep! :completion corfu +individual)
|
||||
:prefix "C-x"
|
||||
:gi "C-l" #'cape-line
|
||||
:gi "C-k" #'cape-keyword
|
||||
:gi "C-f" #'cape-file
|
||||
:gi "s" #'cape-dict
|
||||
:gi "C-s" #'yasnippet-capf
|
||||
:gi "C-n" #'cape-dabbrev
|
||||
:gi "C-p" #'cape-history)
|
||||
(:map corfu-map
|
||||
"C-S-s" #'+corfu-move-to-minibuffer
|
||||
"C-p" #'corfu-previous
|
||||
"C-n" #'corfu-next
|
||||
"S-TAB" #'corfu-previous
|
||||
[backtab] #'corfu-previous
|
||||
"TAB" #'corfu-next
|
||||
[tab] #'corfu-next
|
||||
(:when (modulep! :completion corfu +orderless)
|
||||
[remap corfu-insert-separator] #'+corfu-smart-sep-toggle-escape)))
|
||||
(when-let ((cmds-del
|
||||
`(menu-item "Reset completion" corfu-reset
|
||||
:filter ,(lambda (cmd)
|
||||
(interactive)
|
||||
(when (and (>= corfu--index 0)
|
||||
(eq corfu-preview-current 'insert))
|
||||
cmd))))
|
||||
(cmds-ret-pt
|
||||
`(menu-item "Insert completion or pass-through" corfu-insert
|
||||
:filter ,(lambda (cmd)
|
||||
(interactive)
|
||||
(if (>= corfu--index 0)
|
||||
cmd
|
||||
(corfu-quit))))))
|
||||
(let ((cmds-del
|
||||
`(menu-item "Reset completion" corfu-reset
|
||||
:filter ,(lambda (cmd)
|
||||
(interactive)
|
||||
(when (and (>= corfu--index 0)
|
||||
(eq corfu-preview-current 'insert))
|
||||
cmd))))
|
||||
(cmds-ret
|
||||
`(menu-item "Insert completion DWIM" corfu-insert
|
||||
:filter ,(lambda (cmd)
|
||||
(interactive)
|
||||
(cond ((null +corfu-want-ret-to-confirm)
|
||||
(corfu-quit))
|
||||
((or (not (minibufferp nil t))
|
||||
(eq +corfu-want-ret-to-confirm t))
|
||||
(when (>= corfu--index 0) cmd))
|
||||
((eq +corfu-want-ret-to-confirm 'minibuffer)
|
||||
(funcall-interactively cmd)
|
||||
nil)
|
||||
(t cmd))))))
|
||||
(map! :when (modulep! :completion corfu)
|
||||
:after corfu
|
||||
:map corfu-map
|
||||
[backspace] cmds-del
|
||||
"DEL" cmds-del
|
||||
(:when (modulep! :completion corfu +on-ret)
|
||||
:gi [return] #'corfu-insert
|
||||
:gi "RET" #'corfu-insert)
|
||||
(:when (modulep! :completion corfu +on-ret-pt)
|
||||
:gi [return] cmds-ret-pt
|
||||
:gi "RET" cmds-ret-pt)
|
||||
(:unless (or (modulep! :completion corfu +on-ret)
|
||||
(modulep! :completion corfu +on-ret-pt))
|
||||
:gi [return] nil
|
||||
:gi "RET" nil)))
|
||||
:gi [return] cmds-ret
|
||||
:gi "RET" cmds-ret))
|
||||
|
||||
;; Smarter C-a/C-e for both Emacs and Evil. C-a will jump to indentation.
|
||||
;; Pressing it again will send you to the true bol. Same goes for C-e, except
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue