I recently added jedi-vim to my plug-in arsenal. It works just fine for the standard modules, but is unable to find bpy and bmesh stuff.
So in the blender console I took the output of print(sys.path)
and added it to a vimscript function in a .lvimrc
file, like this:
function BpyPath()
python sys.path.append('/home/john/src/blender-2.77-linux-glibcl211-x86_64/2.77/python/lib/python3.5')
...
endfunction
Now it works better. Typing bpy.
gives me:
But typing bpy.context.
still gives me: -- Omni completion (^O^N^P) Pattern not found
Versions:
I am not a very advanced python or vim user, so any help is appreciated.
I just realized that there's not a lot of hope, because you're already talking to a compiled (C/C++) module.
If dir(bpy.context)
(in a Python shell) doesn't give you the completions that you want, Jedi will also not be able to infer this information. If dir
gives you something reasonable, just create an issue in the Jedi issue tracker. It would be a bug, IMO.
I'm planning a plugin system for Jedi, to make it possible to use Jedi with such use cases as well. But this will probably take two years.