Load snippets *after* yasnippet config in daemon

This commit is contained in:
Henrik Lissner 2020-04-24 04:07:57 -04:00
parent 309e71eea7
commit f8693d0f8c
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -20,9 +20,7 @@
;; Remove default ~/.emacs.d/snippets
(defvar yas-snippet-dirs nil)
(if (daemonp)
;; If in a daemon session, front-load this expensive work:
(after! yasnippet (yas-reload-all))
(unless (daemonp)
;; Ensure `yas-reload-all' is called as late as possible. Other modules
;; could have additional configuration for yasnippet. For example,
;; file-templates.
@ -89,7 +87,10 @@
;; Replace commands with superior alternatives
:map yas-minor-mode-map
[remap yas-new-snippet] #'+snippets/new
[remap yas-visit-snippet-file] #'+snippets/edit))
[remap yas-visit-snippet-file] #'+snippets/edit)
;; If in a daemon session, front-load this expensive work:
(if (daemonp) (yas-reload-all)))
(use-package! auto-yasnippet