autocomplete in vim doesn't work when I hit ENTER and the cursor go to the next line.
this is my .vimrc configuration: https://github.com/marcosvidolin/dotfiles/blob/master/.vimrc
Popup example:
Thanks
I am using vim and using Coc module for language server configuration. Try to run these following steps:
GO111MODULE=on go get golang.org/x/tools/gopls@latest
:CocConfig
and setting up go language configuration like the following bellow. (note: feel free to customize the value, especially in field rootPatterns){
"languageserver": {
"golang": {
"command": "gopls",
"rootPatterns": ["go.mod", "main.go", ".vim/", ".git/", ".hg/"],
"filetypes": ["go"],
"initializationOptions": {
"usePlaceholders": true
}
}
}
}
you need to add this to your .vimrc
source : Completion with sources