mirror of
https://github.com/correl/dotfiles.git
synced 2024-11-16 11:09:29 +00:00
[emacs] Don't load jedi when not editing a file
This commit is contained in:
parent
fd98563284
commit
a5db945bcb
1 changed files with 8 additions and 3 deletions
|
@ -273,14 +273,19 @@ Configure jedi and company-mode to provide auto-completion for python.
|
||||||
(use-package pungi
|
(use-package pungi
|
||||||
:ensure t
|
:ensure t
|
||||||
:commands pungi:setup-jedi
|
: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
|
(use-package company-jedi
|
||||||
:ensure t
|
:ensure t
|
||||||
:config (progn
|
:config (progn
|
||||||
(defun my/enable-company-jedi ()
|
(defun my/enable-company-jedi ()
|
||||||
(add-to-list 'company-backends 'company-jedi))
|
(when buffer-file-name
|
||||||
(add-hook #'python-mode-hook #'my/enable-company-jedi)))
|
(add-to-list 'company-backends 'company-jedi)))
|
||||||
|
(add-hook #'python-mode-hook
|
||||||
|
#'my/enable-company-jedi)))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
*** Ruby
|
*** Ruby
|
||||||
|
|
Loading…
Reference in a new issue