1
0
Fork 0

[oni-core] Only enable yas-global-mode if everything is installed

This commit is contained in:
Tom Willemse 2021-08-12 22:02:17 -07:00
parent 7f8da57f4d
commit ddd2d044ac
Signed by: ryuslash
GPG key ID: 7D5C407B435025C1

View file

@ -4,7 +4,7 @@
;; Author: Tom Willemse <tom@ryuslash.org>
;; Keywords: local
;; Version: 2021.0807.195258
;; Version: 2021.0807.195510
;; Package-Requires: (oni-data-dir oni-embrace oni-hydra expand-region multiple-cursors gcmh diminish ws-butler which-key insert-char-preview dashboard)
;; This program is free software; you can redistribute it and/or modify
@ -271,7 +271,12 @@ _s_: String list"
(with-eval-after-load 'sh (require 'oni-sh))
(with-eval-after-load 'smartparens (require 'oni-smartparens))
(with-eval-after-load 'vterm (require 'oni-vterm))
(with-eval-after-load 'yasnippet (require 'oni-yasnippet))
(with-eval-after-load 'yasnippet
(require 'oni-yasnippet)
(when (and (package-installed-p 'oni-yasnippet)
(not yas-global-mode))
(yas-global-mode)))
;; Enable any modes that I want to have turned on right away.
@ -282,8 +287,6 @@ _s_: String list"
(ws-butler-global-mode)
(which-key-mode)
(auto-insert-mode)
(when (package-installed-p 'oni-yasnippet)
(yas-global-mode))
(provide 'oni-core)
;;; oni-core.el ends here