dev: merge branch 'pr7739' into emenel
This commit is contained in:
commit
790c512387
1 changed files with 41 additions and 37 deletions
|
@ -468,54 +468,58 @@ Continues comments if executed from a commented line. Consults
|
||||||
(let ((cmds-del
|
(let ((cmds-del
|
||||||
`(menu-item "Reset completion" corfu-reset
|
`(menu-item "Reset completion" corfu-reset
|
||||||
:filter ,(lambda (cmd)
|
:filter ,(lambda (cmd)
|
||||||
(when (and (>= corfu--index 0)
|
(cond
|
||||||
(eq corfu-preview-current 'insert))
|
((and (>= corfu--index 0)
|
||||||
cmd))))
|
(eq corfu-preview-current 'insert))
|
||||||
|
cmd)))))
|
||||||
(cmds-ret
|
(cmds-ret
|
||||||
`(menu-item "Insert completion DWIM" corfu-insert
|
`(menu-item "Insert completion DWIM" corfu-insert
|
||||||
:filter ,(lambda (cmd)
|
:filter ,(lambda (cmd)
|
||||||
(cond ((null +corfu-want-ret-to-confirm)
|
(cond
|
||||||
(corfu-quit)
|
((null +corfu-want-ret-to-confirm)
|
||||||
nil)
|
(corfu-quit)
|
||||||
((eq +corfu-want-ret-to-confirm 'minibuffer)
|
nil)
|
||||||
(funcall-interactively cmd)
|
((eq +corfu-want-ret-to-confirm 'minibuffer)
|
||||||
nil)
|
(funcall-interactively cmd)
|
||||||
((and (or (not (minibufferp nil t))
|
nil)
|
||||||
(eq +corfu-want-ret-to-confirm t))
|
((and (or (not (minibufferp nil t))
|
||||||
(>= corfu--index 0))
|
|
||||||
cmd)
|
|
||||||
((or (not (minibufferp nil t))
|
|
||||||
(eq +corfu-want-ret-to-confirm t))
|
(eq +corfu-want-ret-to-confirm t))
|
||||||
nil)
|
(>= corfu--index 0))
|
||||||
(t cmd)))))
|
cmd)
|
||||||
|
((or (not (minibufferp nil t))
|
||||||
|
(eq +corfu-want-ret-to-confirm t))
|
||||||
|
nil)
|
||||||
|
(t cmd)))))
|
||||||
(cmds-tab
|
(cmds-tab
|
||||||
`(menu-item "Select next candidate or expand/traverse snippet" corfu-next
|
`(menu-item "Select next candidate or expand/traverse snippet" corfu-next
|
||||||
:filter (lambda (cmd)
|
:filter (lambda (cmd)
|
||||||
(cond ,@(when (modulep! :editor snippets)
|
(cond
|
||||||
'(((and +corfu-want-tab-prefer-navigating-snippets
|
,@(when (modulep! :editor snippets)
|
||||||
(+yas-active-p))
|
'(((and +corfu-want-tab-prefer-navigating-snippets
|
||||||
#'yas-next-field-or-maybe-expand)
|
(+yas-active-p))
|
||||||
((and +corfu-want-tab-prefer-expand-snippets
|
#'yas-next-field-or-maybe-expand)
|
||||||
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
|
((and +corfu-want-tab-prefer-expand-snippets
|
||||||
#'yas-expand)))
|
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
|
||||||
,@(when (modulep! :lang org)
|
#'yas-expand)))
|
||||||
'(((and +corfu-want-tab-prefer-navigating-org-tables
|
,@(when (modulep! :lang org)
|
||||||
(org-at-table-p))
|
'(((and +corfu-want-tab-prefer-navigating-org-tables
|
||||||
#'org-table-next-field)))
|
(org-at-table-p))
|
||||||
(t cmd)))) )
|
#'org-table-next-field)))
|
||||||
|
(t cmd)))) )
|
||||||
(cmds-s-tab
|
(cmds-s-tab
|
||||||
`(menu-item "Select previous candidate or expand/traverse snippet"
|
`(menu-item "Select previous candidate or expand/traverse snippet"
|
||||||
corfu-previous
|
corfu-previous
|
||||||
:filter (lambda (cmd)
|
:filter (lambda (cmd)
|
||||||
(cond ,@(when (modulep! :editor snippets)
|
(cond
|
||||||
'(((and +corfu-want-tab-prefer-navigating-snippets
|
,@(when (modulep! :editor snippets)
|
||||||
(+yas-active-p))
|
'(((and +corfu-want-tab-prefer-navigating-snippets
|
||||||
#'yas-prev-field)))
|
(+yas-active-p))
|
||||||
,@(when (modulep! :lang org)
|
#'yas-prev-field)))
|
||||||
'(((and +corfu-want-tab-prefer-navigating-org-tables
|
,@(when (modulep! :lang org)
|
||||||
(org-at-table-p))
|
'(((and +corfu-want-tab-prefer-navigating-org-tables
|
||||||
#'org-table-previous-field)))
|
(org-at-table-p))
|
||||||
(t cmd))))))
|
#'org-table-previous-field)))
|
||||||
|
(t cmd))))))
|
||||||
(map! :when (modulep! :completion corfu)
|
(map! :when (modulep! :completion corfu)
|
||||||
:map corfu-map
|
:map corfu-map
|
||||||
[backspace] cmds-del
|
[backspace] cmds-del
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue