1

I am new to Vim and NeoVim, I setup the latest NeoVim on MAC using brew install nvim --head.

I setup the latest verison for the lsp suppport. I installed the CoC plugin and the CoC-go plugin for auto-completion in go.

However I see a problem:

  1. When I open any go file for the first time, after pressing ., NeoVim hangs for few seconds before it starts working and the autocomplete popup is visible. Below the status line I see the error Source go timeout after 5000ms

  2. On press of . the auto-completion popup opens and closes immediately; I have to erase the . and type it once again for the auto-completion to be visible again. It does not close the second time. This happens every time.

Is this because the current latest version is unstable or is there any configuration I am missing? The first problem is still manageable since it happens only once; the second affects my productivity.

-----Edit: Adding code

set completeopt=menu,menuone,noselect
set guifont=monaco:h12
call plug#begin('~/.config/nvim/plugged')
    Plug 'cocopon/iceberg.vim' 
    Plug 'nvim-lua/popup.nvim'
    Plug 'nvim-lua/plenary.nvim'
    Plug 'nvim-telescope/telescope.nvim'
    Plug 'fatih/vim-go'
    Plug 'neoclide/coc.nvim', {'branch': 'release'}
    Plug 'neovim/nvim-lspconfig'
    Plug 'Yggdroot/indentLine'
call plug#end()

au filetype go inoremap <buffer> . .<C-x><C-o>

"adding coc setings
source ~/.config/nvim/plug-config/coc.vim  

--Update:

au filetype go inoremap <buffer> . .<C-x><C-o> 

this line seems to be the culprit

2
  • 1
    Welcome to Vi and Vim! I've made some edits, mostly for formatting. You might want to investigate where that error is coming from (I wonder if it's related to the second issue?). In either case, perhaps start with these debugging posts: How to debug my vimrc How to debug a mapping
    – D. Ben Knoble
    Apr 12 at 21:16
  • 1
    You should provoide a MWE for others to reproduce your issue. Otherwise, it is just wild guessing. Anyway, if you think you have found a bug, which is not likely given that coc.nvim is pretty mature, report it to the coc-go repo.
    – jdhao
    Apr 13 at 2:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.