Open aleprovencio opened 8 years ago
Those patterns require you to start a string, like get_template('
. The pattern for render()
expects the completions to start at the second argument: render(request, '
.
If you are doing that and it's still not working, I'll need more info such as what plugin you're using for completions or if the file has b:is_python
set, etc.
That's exactly what I'm trying, I'm using YouCompleteMe and b:is_python is not set. Please tell me if you need more info.
b:is_python is not set
Well, that's your problem. Do you why it isn't being set? If you manually set b:is_django
to 1
do the completions work?
b:is_django
actually does get set, b:is_python
is the one which doesn't.
Oh, sorry that was a typo. I meant b:is_django
the first time. What does echo &omnifunc
show?
I haven't used YCM in a long time, but from what I remember, it might be that it's not picking up the omnifunc set by this plugin and I don't think there's anything I can do about it without digging into YCM's docs or sources, which I'm not keen on doing.
One last thing you can try if &omnifunc
shows djangoplus#complete
is moving the cursor to where you expect completions to be and press ^X^O
to see if that manually triggers Vim's completion.
&omnifunc
shows youcompleteme#OmniComplete
...
Yeah, so what I said above. django-plus
uses after/ftplugin/python.vim
since that is the best time to capture an existing omnifunc
to act as a pass-through. If omnifunc
is set to YMC's, that means it overrode it after django-plus
did.
I abandoned YCM a long time ago because of how involving the setup is. So, I personally don't want to look into making this compatible with YCM. If you can figure out how to fix this, I'd be more than happy to accept a PR, though.
I see... I don't think I can tackle that now also, but thanks!
Although I'm able to use these completions from the templates themselves using
{% extends %}
I don't get any when usingrender()
,get_template()
and friends.