Add private snippets directory to yas-snippet-dirs

This commit is contained in:
ralesi 2015-01-28 09:45:13 -07:00 committed by syl20bnr
parent 51066c68f3
commit 5c4270be00
2 changed files with 10 additions and 2 deletions

View File

@ -0,0 +1,6 @@
# Private repository snippets
The content of this directory is ignored by Git. This is the default place
where to store your private yasnippets.
This path will be loaded automatically and used whenever Yasnippets loads.

View File

@ -2128,10 +2128,12 @@ which require an initialization must be listed explicitly in the list.")
(if (not (boundp 'yas-minor-mode))
(progn
(let* ((dir (configuration-layer/get-layer-property 'spacemacs :ext-dir))
(yas-dir (list (concat dir "yasnippet-snippets"))))
(setq yas-snippet-dirs yas-dir)
(private-yas-dir (concat configuration-layer-private-directory "snippets"))
(yas-dir (concat dir "yasnippet-snippets")))
(setq yas-snippet-dirs (list private-yas-dir yas-dir))
(yas-global-mode 1)))))
(add-to-hooks 'spacemacs/load-yasnippet '(prog-mode-hook
markdown-mode-hook
org-mode-hook))
(defun spacemacs/force-yasnippet-off ()