completion-nvim icon indicating copy to clipboard operation
completion-nvim copied to clipboard

Unwanted auto-completed letters in special buffer

Open romgrk opened this issue 5 years ago • 3 comments

I'm opening the issue regarding an issue that was observed in clap's input window. In some cases, something seems to be typing letters that are not wanted by the user.

Detailed report can be found here: https://github.com/liuchengxu/vim-clap/issues/580

It was observed that both users reporting the issue were using completion.nvim, and I was wondering if you'd have any insight as to why this could be happening.

Thanks.

romgrk avatar Nov 06 '20 05:11 romgrk

I add following line to init.vim to avoid conflict with vim-clap.

What the line does is to check buffer type If it is nofile which is for vim-clap buffer, then do nothing; else enable completion for that buffer.

autocmd BufEnter * if &buftype != "nofile" | lua require'completion'.on_attach()

Hope this works for others

BokilaLin avatar Dec 01 '20 12:12 BokilaLin

Thanks @BokilaLin , this worked great. The described problem happened for me with telescope.nvim after I added the buffers completion source which I wanted to be available in all (file) buffers.

tmke8 avatar Jun 03 '21 16:06 tmke8

The problem also happens for me with telescope and your solution to check the buftype works. To trigger the bug, I need to have the option completion_auto_change_source set to 1 and the problem goes away if I comment this line (source.triggerCompletion(false, manager)).

cljoly avatar Jul 02 '21 20:07 cljoly