mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Add minor-mode-specific snippets & company-dict dictionaries
This commit is contained in:
@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user