A library to talk with neovim in Qt


$ mkdir build
$ cd build
$ cmake ..


The NeovimConnector class is used to setup the connection to Neovim. It also provides you with some VERY low level methods to call RPC functions - but in general you should be using the QObject returned by NeovimConnector::neovimObject()

  1. To call a function just call the corresponding slot - slots have the same names as the original neovim functions - these are async (return void)
  2. To get the result of the call catch the corresponding signals, by convention these signals are named 'on_' + slot_name
  3. The Neovim() class is automagically generated from the Neovim metadata
  4. For Neovim functions that take the Object type we use QVariant, this seems to be the natural equivalent in Qt
  5. Neovim has recently started supporting event notifications, via vim_subscribe(), you can connect to the Neovim::neovimEvent signal to catch them


  • Qt5
  • libmsgpack
  • Neovim

Update the RPC bindings

Part of the code is autogenerated by calling Neovim to get the API metadata, and generating C++ code. This is done using a python script (generate_bindings.py) if you just want to use neovim-qt as is you don't need to worry about this, I already include the generated code in the repository.

The bindings source templates are stored under the bindings/ folder the generated code is in src/auto/.

To generate the bindings yourself you need

  • python
  • python-msgpack
  • jinja2

Just run make bindings.


A crapload of them

  • Error checking (start with the QIODevice related errros)
  • We can be more pedantic about argcount in startRequest
  • I currently do not implement synchronous calls, I suppose it would be possible to generate more code to do it using QEventLoop
  • Make it pretty, i.e. hide msgpack internals, PIMPL the NeovimConnector/Function class, etc