AutoComplPop and Neovim don't work well together
AutoComplPop and Neovim do not play nicely together. Specifically, if you open a :term window, leave terminal mode, and then press i to get back into -- TERMINAL -- mode, it will spit some scrambled text out to you, part of which is some of the autocomplpop source.
I've tried to do some stuff to make it work, but can't seem to find an answer with my limited Vimscript knowledge. For example:
augroup terminal
autocmd TermOpen * :AutoComplPopDisable
augroup END
I figured out that I could create an auto-command that would execute when I would initially open a terminal window. I used this to disable AutoComplPop. This approach has at least two problems:
- I can't re-enable AutoComplPop because there is no
TermCloseevent - Even if I could do 1., AutoComplPop would not get disabled yet again upon me re-entering terminal mode. The
TermOpenevent is only fired when the terminal is opened for the first time - not when the terminal buffer is brought into focus.
Now, I don't have any particular prejudice for AutoComplPop, I just like that it's very light and simply pops up the auto-complete window if there are any matches to the word I'm typing. I've looked around for alternatives, but they all seem a bit heavy and complex.
Does anyone know how to get this working, or a possible lightweight alternative for Neovim?
Posted Aug 18, 2015, 1:22 AM UTC
You should use
:AcpLockinstead of:AutoComplPopDisable.You can use deoplete. https://github.com/Shougo/deoplete.nvim
If I do this I still can't toggle the lock on and off each time I bring a terminal buffer into focus.
I'm trying to configure it to my likings, but I am having one issue so far. If I have the both
fooandFoosomewhere in my current buffer, I'd like for both options to be presented in the auto-complete when I typefo, with thefoooption being first in line. This is the behaviour from AutoComplPop that I am used to. I have tried playing around with smartcase and ignorecase, but haven't been able to produce the result I'm after. Does anyone know how I might configure deoplete to behave the way I want?You can try asking in the github repository in case someone there know how to help you.
Oh, sorry. It seems acp's feature.
It is feature. deoplete does not save candidates position.