From 505fdde1d915513c386995b383ffa2a5fbdf2f08 Mon Sep 17 00:00:00 2001 From: "Aaron L. Zeng" Date: Fri, 24 Nov 2023 12:35:10 -0500 Subject: [PATCH] [auto-completion] Do not erase yas-snippet-dirs set by other layers At my site, we have an internal package that adds some entries to yas-snippet-dirs (in a with-eval-after-load on yasnippet). These are currently getting erased by the auto-completion layer. It seems to make more sense for the latter to simply add entries, rather than replacing the whole list. --- layers/+completion/auto-completion/packages.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/layers/+completion/auto-completion/packages.el b/layers/+completion/auto-completion/packages.el index 639518810dab..029a613892b2 100644 --- a/layers/+completion/auto-completion/packages.el +++ b/layers/+completion/auto-completion/packages.el @@ -275,6 +275,7 @@ :init ;; We don't want undefined variable errors (defvar yas-global-mode nil) + (defvar yas-snippet-dirs nil) (setq yas-triggers-in-field t yas-wrap-around-region t helm-yas-display-key-on-candidate t) @@ -302,7 +303,6 @@ dotspacemacs-directory))) (when (file-accessible-directory-p snippet-dir) snippet-dir))))) - (setq yas-snippet-dirs nil) ;; ~/.emacs.d/layers/auto-completion/snippets (add-to-list 'yas-snippet-dirs spacemacs-layer-snippets-dir) ;; ~/.emacs.d/private/snippets