feat(corfu): update smart tab completion

This commit updates the smart tab functionality so that:
1. The only functionality checked is for the modules that are enabled.
2. The priority of the TAB behavior is tunable by the user.

This also updates the TAB behavior for the Corfu module to be
`indent-for-tab-command` instead of `completion-at-point` so that users
can use the TAB key to indent their code and navigating Org tables.

We also address #7372 by checking overriding-terminal-local-map, as that
is used by Embark.
This commit is contained in:
StrawberryTea 2024-03-20 18:02:27 -05:00
parent 73f19acb66
commit 390a9c1ea4
5 changed files with 147 additions and 62 deletions

View file

@ -0,0 +1,7 @@
;;; 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)))))