How to disable omnifunc autowrite suggestions

218 views Asked by At

I am new to vim and I installed vim-go today. I set up auto completion with gopls with omnifunc set as go#complete#Complete. It works as expected but it always writes the current suggestion automatically. this is very annoying since it always writes the suggestion without me accepting it.

1

There are 1 answers

0
Kirubel On BEST ANSWER

It turns out the problem was the default value of completeopt option in vim. editing it to have the value noinsert solved the problem. add the following line in ~/.vimrc

set completeopt=menuone,popup,noinsert

The above is just an example. the values except noinsert are just my own preferences.