editor/snippets: don't auto-enable yas-global-mode
This commit is contained in:
parent
567d0b6d16
commit
33c220902e
1 changed files with 12 additions and 2 deletions
|
@ -65,5 +65,15 @@
|
||||||
[remap yas-visit-snippet-file] #'+snippets/edit))
|
[remap yas-visit-snippet-file] #'+snippets/edit))
|
||||||
|
|
||||||
|
|
||||||
;;;###package auto-yasnippet
|
(def-package! auto-yasnippet
|
||||||
(setq aya-persist-snippets-dir (concat doom-etc-dir "auto-snippets/"))
|
:defer t
|
||||||
|
:init (setq aya-persist-snippets-dir (concat doom-etc-dir "auto-snippets/"))
|
||||||
|
:config
|
||||||
|
(def-advice! +snippets-inhibit-yas-global-mode (orig-fn &rest args)
|
||||||
|
"auto-yasnippet enables `yas-global-mode'. This is obnoxious for folks like
|
||||||
|
us who use yas-minor-mode and enable yasnippet more selectively. This advice
|
||||||
|
swaps `yas-global-mode' with `yas-minor-mode'."
|
||||||
|
:around '(aya-expand aya-open-line)
|
||||||
|
(cl-letf (((symbol-function #'yas-global-mode) #'yas-minor-mode)
|
||||||
|
(yas-global-mode yas-minor-mode))
|
||||||
|
(apply orig-fn args))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue