mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
fix(config): fix corfu smart tab behavior
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
;;; config/default/autoload/filters.el -*- lexical-binding: t; -*-
|
||||
|
||||
;;;###autoload
|
||||
(defun +yas-active-p ()
|
||||
"Return t if we are in a YASnippet field."
|
||||
(memq (bound-and-true-p yas--active-field-overlay)
|
||||
(overlays-in (1- (point)) (1+ (point)))))
|
@ -496,13 +496,15 @@ Continues comments if executed from a commented line. Consults
|
||||
(cond
|
||||
,@(when (modulep! :editor snippets)
|
||||
'(((and +corfu-want-tab-prefer-navigating-snippets
|
||||
(+yas-active-p))
|
||||
(memq (bound-and-true-p yas--active-field-overlay)
|
||||
(overlays-in (1- (point)) (1+ (point)))))
|
||||
#'yas-next-field-or-maybe-expand)
|
||||
((and +corfu-want-tab-prefer-expand-snippets
|
||||
(yas-maybe-expand-abbrev-key-filter 'yas-expand))
|
||||
#'yas-expand)))
|
||||
,@(when (modulep! :lang org)
|
||||
'(((and +corfu-want-tab-prefer-navigating-org-tables
|
||||
(featurep 'org)
|
||||
(org-at-table-p))
|
||||
#'org-table-next-field)))
|
||||
(t cmd)))) )
|
||||
@ -513,10 +515,12 @@ Continues comments if executed from a commented line. Consults
|
||||
(cond
|
||||
,@(when (modulep! :editor snippets)
|
||||
'(((and +corfu-want-tab-prefer-navigating-snippets
|
||||
(+yas-active-p))
|
||||
(memq (bound-and-true-p yas--active-field-overlay)
|
||||
(overlays-in (1- (point)) (1+ (point)))))
|
||||
#'yas-prev-field)))
|
||||
,@(when (modulep! :lang org)
|
||||
'(((and +corfu-want-tab-prefer-navigating-org-tables
|
||||
(featurep 'org)
|
||||
(org-at-table-p))
|
||||
#'org-table-previous-field)))
|
||||
(t cmd))))))
|
||||
|
Reference in New Issue
Block a user