A Qt Creator plugin that helps those who are used to editing text in Neovim/Vim and also need Qt Creator features to combine these two.
It runs an instance of Neovim inside Qt Creator, so it's able to run your
init.lua
/init.vim
and all your Neovim plugins and your tweaks in
init.vim
/init.lua
should work.
qnvim is in development, but it's mostly stable and usable. Currently these are the known issues:
- It doesn't support splits nor windows
- It should use vim highlights for buffers that Qt Creator doesn't support. (like Vim helpfiles and many others.)
Neovim plugins should work alright except a few that relate on highlights (Qt Creator highlights C++ and QML better than any Vim plugin, so it's totally alright.) and those that rely on special buffers. (Work is in progress to handle all types of buffers.)
Please report any problems you encounter and consider contributing to this project if you have the time.
Go to the releases section and download the version of the plugin matching your Qt Creator version and operating system. Then:
- Open Qt Creator > Help > About Plugins > Install Plugin...
- Select the plugin you've downloaded earlier and relaunch Qt Creator.
⚠️ Warning⚠️ As per Qt policies major and minor versions of Qt Creator Plugin APIs are not compatible, meaning that there is no guarantee that the plugin version on the master branch is compatible with any version of Qt Creator not specified in
cmake/FetchQtCreator.cmake
file.
- Ensure you have Qt development files installed in your system.
- Clone this repository and go to its directory. Checkout a Git tag, that is compatible with your Qt Creator version.
cmake -S . -B build/
.cmake --build build/
. The compiled plugin will be insidebuild/lib/qtcreator/plugins
.- Open Qt Creator > Help > About Plugins > Install Plugin... Select the plugin you have built earlier.
Before updating from source, delete the build
directory from earlier to
avoid problems such as
this.
To update the plugin you need to recompile it: checkout a tag, that matches your Qt Creator version and execute the steps above again.
Arch Linux users can install qnvim-git from AUR via AUR helper or with the following commands:
git clone https://aur.archlinux.org/qnvim-git.git
cd qnvim-git
makepkg -si
You can put custom Vim commands for your Qt Creator environment in qnvim.vim
which is a file in the same directory as init.vim
(:help $MYVIMRC
).
$MYQVIMRC
(note the Q
after MY
) is set to its path.
There's a sample examples/qnvim.vim
file available in the repo, it provides
most of the convenient keyboard shortcuts for building, deploying, running,
switching buffers, switching tabs, etc. It'll also help you understand how you
can create new keyboard shortcuts using Qt Creator commands.
And the libraries used in above projects and are mentioned in their docs.