I'm trying to create a shared C library that uses the gobject library as foundation. So my object inherits in GObject speak from GObject. GObject allows bindings to all different scripting languages such as Python via GObject introspection. Then from python one can import the library from the gi.repository.
import gi
gi.require_versions({'Edf': '0.0', 'GLib': '2.0'})
from gi.repository import Edf
Vim offers autocompletion via jedi-vim. This works out of the box for other libraries making use of the GObject introspections, such as GLib and GTK. I would like use pytest to run some unit tests of the libraries. I would like very much to edit my files using vim with autocompletion for my own library. So if I import a library as Above, I do get autocompletion for GLib, but not for my Edf module.
I've tried to getting autocompletion to work via setting the GI_TYPELIB_PATH environmental variable to the directory containing my Edf.typelib file. Also I've created a debian package and intstalled the library to /usr/lib/x86_64-linux-gnu/
and the typelib to /usr/lib/x86_64-linux-gnu/girepository-1.0/
, both these methods are enough to get autocompletion in REPL's such as bpython3, ipython3 and even the python REPL, however I'm unable to get completion using jedi-vim inside vim.
I would be very happy to see it working. Has anyone any tips to get it to work?
Best regards and thank you for your attention.