2

Documentation says that it can be done by making some variables buffer local. But how to make it correctly?

Can somebody show me example how to configure this jedi.el behaviour correctly?

Now I have two virtualenv with installed jedi for python 2 and 3. When I change working virtualenv or python buffer, I'll check current python version and if it has changed i call this function

(defun cm:jedi-setup-server ()
  "Setup Jedi server, update and reload."
  (interactive)
  (if (not (equal python-environment-default-root-name (cm:jedi-environment-root-name)))
      (progn
        (custom-set-variables
         '(python-environment-default-root-name (cm:jedi-environment-root-name))
         '(jedi:server-command
           (concat (venv-name-to-dir (cm:jedi-environment-root-name)) "bin/jediepcserver")))
        (jedi:install-server-block))))
  • Quiestion updated – sivakov512 Mar 11 '17 at 6:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.