mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
editor/snippets: load doom-snippets sooner
We want +snippets-dir to be first in yas-snippet-dirs. To ensure this, doom-snippets should be loaded immediately before it is added to it, if possible.
This commit is contained in:
@ -21,10 +21,12 @@
|
||||
:config
|
||||
(setq yas-verbosity (if doom-debug-mode 3 0)
|
||||
yas-also-auto-indent-first-line t
|
||||
yas-triggers-in-field nil ; disallow nested snippets
|
||||
;; Remove default ~/.emacs.d/snippets
|
||||
yas-snippet-dirs (delete yas--default-user-snippets-dir yas-snippet-dirs))
|
||||
|
||||
;; default snippets library, if available
|
||||
(require 'doom-snippets nil t)
|
||||
|
||||
;; Allow private snippets in DOOMDIR/snippets
|
||||
(add-to-list 'yas-snippet-dirs '+snippets-dir nil #'eq)
|
||||
|
||||
@ -63,10 +65,5 @@
|
||||
[remap yas-visit-snippet-file] #'+snippets/edit))
|
||||
|
||||
|
||||
;; `auto-yasnippet'
|
||||
;;;###package auto-yasnippet
|
||||
(setq aya-persist-snippets-dir (concat doom-etc-dir "auto-snippets/"))
|
||||
|
||||
|
||||
;; default snippets library
|
||||
(def-package! doom-snippets
|
||||
:after yasnippet)
|
||||
|
Reference in New Issue
Block a user