Closed monkoose closed 8 years ago
That's strange because that error can't happen if it does exist. pythoncomplete#Complete()
is the default completer that's in $VIMRUNTIME/ftplugin/python.vim
. This plugin overrides it and defers to it if there's no Django-specific completions. Could you check the omnifunc
setting in a non-Django file to see if it's set? If it is, try calling the function with echo pythoncomplete#Complete(1, '')
. Also, try performing a completion with <c-x><c-o>
to see if you get the same error.
outside a django project
omnifunc=jedi#completions
and inside too
maybe i should turn off vim-jedi completiions? I used it(with manual completions) because deoplete-jedi sometimes fails with large libraries.
echo pythoncomplete#Complete(1, '')
Error: Required vim compiled with +python Error: Required vim compiled with +python E117: Unknown function: pythoncomplete#Complete E15: Invalid expression: pythoncomplete#Complete(1, '')
And with <c-x><c-o>
it calls to vim-jedi not deoplete-jedi with my config without an error.
Update:
ok, i shut down vim-jedi completely, but still have the same error.
omnifunc now outside project is pythoncomplete#Complete
and inside djangoplus#complete as expected, but
echo pythoncomplete#Complete(1, '')
Error: Required vim compiled with +python Error: Required vim compiled with +python E117: Unknown function: pythoncomplete#Complete E15: Invalid expression: pythoncomplete#Complete(1, '')
is the same error
I think I see now. So, it thinks you don't have python 2 installed. What does has('python')
show?
I has. But neovim returns 0 to echo has('python')
and 1 to echo has('python3')
. I don't know why.
Ok, i found. I didn't use neovim-python2 i guess. Let me check, now it returns 1 to echo has('python').
Neovim allows you to run both versions, but you don't need to. The built-in Python completer apparently only supports Python 2, however. But, it's still setting the omnifunc
option. I can add a check to make sure it doesn't try to use it if Python 2 isn't available.
Ok, all works now as expected. Thank you for your time and help.
When editing python files in django project(with outside python files all fine) with deoplete autocompletion there is the error appears in insert mode