Add minor-mode-specific snippets & company-dict dictionaries

This commit is contained in:
Henrik Lissner 2017-03-02 18:17:40 -05:00
parent cc6dee6c99
commit 22e3baf184
2 changed files with 16 additions and 1 deletions

View file

@ -25,6 +25,14 @@
yas-prompt-functions '(yas-completing-prompt yas-ido-prompt yas-no-prompt)
yas-snippet-dirs '(yas-installed-snippets-dir))
;; Allows project-specific snippets
(defun +snippets|enable-project-modes (mode &rest _)
"Enable snippets for project modes."
(if (symbol-value mode)
(yas-activate-extra-mode mode)
(yas-deactivate-extra-mode mode)))
(add-hook 'doom-project-hook '+snippets|enable-project-modes)
;; fix an error caused by smartparens interfering with yasnippet bindings
(advice-add 'yas-expand :before 'sp-remove-active-pair-overlay)