0

In developing a Tryton module, I' d like to have autocompletion in Emacs

The Tryton I' m using is installed in a Python 3.6 virtualenv with pip

I am trying Jedi, but it only offers autocompletions for identifiers defined in my own source file.

It doesn' t offer anything about arguments to methods that I' m calling in order to define tryton fields

For example, if I write

someIdentifier = fields.Function(

it doesn' t offer a peepsqueak about the arguments I can pass to "Function"

What about the signature of Function ?

Maybe I' m using Jedi in the wrong way ?

I' m not sure I understand what jedi-server is for and if it should reside in the same virtualenv as my tryton module

The virtualenv for my Tryton module is Python3.6 based, anyway and it' s like this:

my-module/env

env contains

bin  include  lib  lib64  pip-selfcheck.json  share

When I need to work I do

source env/bin/activate

So I tried

(setq jedi:environment-root "~/path/to/my/module/")

but it created a new virtualenv from scratch, based on python 2.7, scattering bin, lib and the rest in my module folder, overlooking my env virtualenv

How do I setup Jedi properly ?

In my jedi setup info I see this

;; Emacs Lisp version:
(:emacs-version "25.3.1" :jedi-version "0.2.7" :python-environment-version "0.0.2alpha0")
;; Python version:
((:version "2.7.14 (default, Jan 17 2018, 14:28:32) \n[GCC 7.2.1 20170915 (Red Hat 7.2.1-2)]" :name "sys" :file nil)
 (:version "0.11.1" :name "jedi" :file "/home/catonano/.emacs.d/.python-environments/default/lib/python2.7/site-packages/jedi/__init__.pyc")
 (:version "0.0.5" :name "epc" :file "/home/catonano/.emacs.d/.python-environments/default/lib/python2.7/site-packages/epc/__init__.pyc")
 (:version "0.0.3" :name "sexpdata" :file "/home/catonano/.emacs.d/.python-environments/default/lib/python2.7/site-packages/sexpdata.pyc"))
;; Command line:
...
Drew
  • 29,895
  • 7
  • 74
  • 104
user1632812
  • 431
  • 3
  • 16
  • Maybe I should have asked:" I have a virtualenv and some stuff installed in it with pip. How do I configure Jedi in order to deal with the existing stuff ?" – user1632812 Feb 06 '18 at 11:41
  • You might find better answers over at [emacs.se]. It's not strictly off-topic here (a programming mode probably qualifies as a "tool used for programming") but it's more marginal. – Toby Speight Feb 06 '18 at 11:58

0 Answers0