[emacs] Don't load jedi when not editing a file

This commit is contained in:
Correl Roush 2015-09-03 14:38:14 -04:00
parent fd98563284
commit a5db945bcb

View file

@ -273,14 +273,19 @@ Configure jedi and company-mode to provide auto-completion for python.
(use-package pungi
:ensure t
:commands pungi:setup-jedi
:init (add-hook #'python-mode-hook #'pungi:setup-jedi))
:init (add-hook #'python-mode-hook
(lambda ()
(when buffer-file-name
#'pungi:setup-jedi))))
(use-package company-jedi
:ensure t
:config (progn
(defun my/enable-company-jedi ()
(add-to-list 'company-backends 'company-jedi))
(add-hook #'python-mode-hook #'my/enable-company-jedi)))
(when buffer-file-name
(add-to-list 'company-backends 'company-jedi)))
(add-hook #'python-mode-hook
#'my/enable-company-jedi)))
#+end_src
*** Ruby