This change splits the core logic of the plugin into separate class, so that it can be easily enabled/disabled, so we do not have to check for enabled state in sync functions all the time.
This also have an advantage of plugin "hot-reloadiing": we do not need to restart Qt Creator if we want to reconnect to neovim, if the connection failed for some reason.
Notes
I removed reopen parameter in initialize function and replaced it with check for current editor. This should in theory work the same way.
Test
Toggling QNVim should work: now it should turn off all the stuff it modifies in Qt Creator.
Deactivating the plugin works and cleans everything.
When I activate the plugin, keyboard doesn't work for me. I will try to find out what's wrong with my setup as soon as possible.
This change splits the core logic of the plugin into separate class, so that it can be easily enabled/disabled, so we do not have to check for enabled state in sync functions all the time.
This also have an advantage of plugin "hot-reloadiing": we do not need to restart Qt Creator if we want to reconnect to neovim, if the connection failed for some reason.
Notes
reopen
parameter in initialize function and replaced it with check for current editor. This should in theory work the same way.Test