0

I use jedi-vim for completion and it does the thing pretty well. But for some reason I have troubles with completion for parent objects.

For example:

class A:
    variable = 1

class B(A):
    # Won't find any pattern here, only __builtin__.vars
    var # here I hit <C-space>

Is there any settings I should add in my .vimrc or it's just how jedi works? I also dig some issue tracker and didn't find something useful.

valignatev
  • 6,020
  • 8
  • 37
  • 61

2 Answers2

2

Speaking as the author of Jedi: This is something that has never really been supported in Jedi. It might have worked, but it was definitely never tested. Please add an issue to the tracker.

It's a bit similar to https://github.com/davidhalter/jedi/issues/585. This is something that isn't completable in a "normal" way. It's rather something that, because of its semantics, can (should?) be enabled.

Dave Halter
  • 15,556
  • 13
  • 76
  • 103
  • Thanks for answer. I definitely will add an issue for this. And what do you mean by "normal" way? – valignatev Oct 24 '15 at 12:33
  • Good question. It's just not really a defined name in that class. This means you cannot write `x = variable`, because variable is not defined there. However it might be an attribute that you may want to overwrite. Therefore it could make sense to complete it. – Dave Halter Nov 05 '15 at 21:56
0

It works very well for me.

But I use a different version of the Jedi.

My bundle is here: https://github.com/FBruynbroeck/jedi-vim

(Attention, at the end of the class B, you wrote a ';' instead of ':')

FBruynbroeck
  • 499
  • 3
  • 15
  • I edit my example, last one didn't work because of semicolon, as you said. And your bundle differs from origin one only version of jedi? – valignatev Oct 23 '15 at 00:33
  • 1
    Yes, I downgrade the version of jedi because the last version doesn't work with an other bundle (vim-buildout). – FBruynbroeck Oct 23 '15 at 08:29