diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 8694889..91e6471 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -211,13 +211,19 @@ (global-fasd-mode 1) (setq fasd-enable-initial-prompt nil)) (use-package yasnippet + :defer + :init + (add-hook 'LaTeX-mode-hook + '(lambda () + (yas-minor-mode) + (define-key company-active-map "" 'company-to-yasnippet) + (define-key (current-local-map) "" 'company-yasnippet))) :config + (yas-reload-all) (defun company-to-yasnippet () (interactive) (company-abort) - (call-interactively 'company-yasnippet)) - (bind-key "" 'company-to-yasnippet company-active-map) - (bind-key "" 'company-yasnippet)) + (call-interactively 'company-yasnippet))) (use-package swiper :bind ("C-S-s" . swiper) :bind ("C-S-r" . swiper))