-
-
Notifications
You must be signed in to change notification settings - Fork 12
Home
vit edited this page Jul 18, 2022
·
7 revisions
I started with Anaconda3-4.2.0 and had to install the following:
pip install sexpdata-0.0.3.tar.gz
pip install epc-0.0.5.tar.gz
pip install virtualenv-15.1.0.tar.gz
Run jedi:start-server then add this to your Emacs configuration file and restart emacs:
(setq jedi:environment-virtualenv (list (expand-file-name "~/.emacs.d/.python-environments/")))
jedi:show-setup provides jedi setup information
(use-package company-jedi ;;; company-mode completion back-end for Python JEDI
:config
(setq jedi:environment-virtualenv (list (expand-file-name "~/.emacs.d/.python-environments/")))
(add-hook 'python-mode-hook 'jedi:setup)
(setq jedi:complete-on-dot t)
(setq jedi:use-shortcuts t)
(defun config/enable-company-jedi ()
(add-to-list 'company-backends 'company-jedi))
(add-hook 'python-mode-hook 'config/enable-company-jedi))
- M-x install-packages company-jedi
- install requirements for jedi-core according to https://github.com/tkf/emacs-jedi/wiki
- configure .emacs:
(add-hook 'python-mode-hook 'jedi:setup)
(add-hook 'python-mode-hook 'company-mode)
(with-eval-after-load 'jedi-core
(setq jedi:environment-virtualenv (list (expand-file-name "/home/user/.local/lib/python3.10/site-packages")))
(setq jedi:complete-on-dot t)
(setq jedi:use-shortcuts t)
;; my
(setq jedi:get-in-function-call-timeout 0
jedi:get-in-function-call-delay 0
jedi:goto-definition-config '((nil definition nil))
)
(add-to-list 'company-backends 'company-jedi)
)