Add minor-mode-specific snippets & company-dict dictionaries
This commit is contained in:
parent
cc6dee6c99
commit
22e3baf184
2 changed files with 16 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue