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
|
||||
: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
|
||||
|
|
Loading…
Reference in a new issue