3 ms·
I use emacs with jedi too, but the auto-completion is not so good. For example, if my code is: def function1(x): variable1 = x+1 return variable
by S4M 11y ago
I use emacs with jedi too, but the auto-completion is not so good. For example, if my code is:
def function1(x):
variable1 = x+1
return variable1**2
def function2(x):
variable2 = 2*x
return 5+v...
And I get two auto-completion choices: variable1 and variable2, while only variable2 is logical.
- tcas 11y agoI just tried this example, since anaconda-mode + company (which uses jedi) has been really good for me, it doesn't show variable1 for me. http://imgur.com/4l6Otvt http://imgur.com/4l6Otvt I used to use the auto-complete package instead, which in some configs (with ac-source-words-in-buffer or ac-source-words-in-same-mode-buffers in the source list) basically tokenize the buffer and provide autocomplete on all words.
- S4M 11y agoThank you, I gonna check my settings. This bad autocomplete thing has been a mild annoyance for a while.
- tcas 11y agoYea, the switch from auto-complete to company mode was annoying to get done right, but was well worth it in terms of accuracy. It also provides function signatures which my old setup didn't. I also switched to using virtualenv mode as well. I can probably try and dig up the relevant part of my config, but since I'm using prelude as a base now it mostly just works with only a few lines of tweaking in my personal.el -- mostly just virtualenv locations and enabling virtualenv mode with a hook.