Skip to content

Commit

Permalink
[auto-completion] Do not erase yas-snippet-dirs set by other layers
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bcc32 authored and smile13241324 committed Nov 26, 2023
1 parent a6a834f commit 505fdde
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion layers/+completion/auto-completion/packages.el
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 505fdde

Please sign in to comment.