fix(yasnippet): TAB in insert state tries yas-expand before fallback
This commit is contained in:
12
config.el
12
config.el
@@ -1241,7 +1241,17 @@ Otherwise: runs interactive ement-connect, then opens rooms after sync."
|
|||||||
;; Add ~/org/snippets to yas-snippet-dirs (prepend = higher priority).
|
;; Add ~/org/snippets to yas-snippet-dirs (prepend = higher priority).
|
||||||
;; Must be in yas-snippet-dirs so it survives yas-reload-all calls.
|
;; Must be in yas-snippet-dirs so it survives yas-reload-all calls.
|
||||||
(push (expand-file-name "snippets/" org-directory) yas-snippet-dirs)
|
(push (expand-file-name "snippets/" org-directory) yas-snippet-dirs)
|
||||||
(yas-reload-all))
|
(yas-reload-all)
|
||||||
|
|
||||||
|
;; In Evil insert state, TAB first tries yas-expand, then falls back
|
||||||
|
;; to the default TAB behaviour (indent / org-cycle / corfu).
|
||||||
|
;; This lets you type a snippet key (e.g. "adr") and press TAB to expand,
|
||||||
|
;; without breaking org-mode cycling or completion.
|
||||||
|
(map! :i [tab]
|
||||||
|
(lambda ()
|
||||||
|
(interactive)
|
||||||
|
(or (yas-expand)
|
||||||
|
(indent-for-tab-command)))))
|
||||||
|
|
||||||
;;; ============================================================
|
;;; ============================================================
|
||||||
;;; NAVIGATION — link-hint, avy
|
;;; NAVIGATION — link-hint, avy
|
||||||
|
|||||||
Reference in New Issue
Block a user