sassanh / qnvim

Neovim backend for Qt Creator
MIT License
136 stars 8 forks source link

Complete as you type #18

Open Shatur opened 4 years ago

Shatur commented 4 years ago

Is it possible to have autocompletion in insert mode on typing? Without calling shortcut for rpcnotify(g:neovim_channel, 'Gui', 'triggerCommand', 'TextEditor.CompleteThis') every time.

sassanh commented 4 years ago

Yes I think it should be possible, we should decide what triggers it thought, it can be triggered in vim with an autocmd or also it can be triggered directly in QtCreator:

  1. An autocmd in vim calls relevant rpcnotify function whenever user types something in insert mode.
  2. The keypress handler in qnvim triggers auto-completion whenever an alphabetic/numeric key is pressed and vim is insert mode (qnvim knows when vim is insert mode)

A pull request would be appreciated

Shatur commented 4 years ago

or also it can be triggered directly in QtCreator

I will try this way first. I think it can be easier and better for performance.

vtronko commented 4 years ago

What's the status of this? Deal breaker :)

Shatur commented 4 years ago

I currently use neovim directly for C++ projects. I decided that it’s easier to make Neovim work as QtCreator than QtCreator work as Neovim :)

sassanh commented 4 years ago

Unfortunately I do not have any time for this repository at the moment, usually I have a Qt project at least every year or two, and when I'm working on a Qt project I need to improve qnvim as I use it regularly. I was glad to see Hennadii fixing some bugs and maintaining the project but seems like he is not interested any more so currently this project doesn't have any active maintainer unless someone starts helping.

I decided that it’s easier to make Neovim work as QtCreator than QtCreator work as Neovim :)

I agree sometimes it is easier to use neovim directly, that's what I did before qnvim, but sometimes for me it seems impossible to replace Qt Creator with anything, for example as far as I know there's not a good plugin for vim to support qml, or the toolset Qt Creator provides for working with devices (iOS/Android) is exceptional and achieving the same in vim is challenging.