autozimu / LanguageClient-neovim

Language Server Protocol (LSP) support for vim and neovim.
MIT License
3.55k stars 272 forks source link

"Pattern not found" when trying autocomplete and go-langserver #673

Open muni-corn opened 5 years ago

muni-corn commented 5 years ago

Describe the bug

Omnicompletion with gocode and go-langserver returns Pattern not found when using keyboard shortcut

Environment


- Language server link and version:
go-langserver, version v3-dev
https://github.com/sourcegraph/go-langserver

[min-vimrc.vim]: https://github.com/autozimu/LanguageClient-neovim/blob/next/min-vimrc.vim

## To Reproduce
Steps to reproduce the behavior:
1. Create/Fetch example project
2. Start nvim, `nvim -u min-vimrc.vim`
3. Make sure deoplete is installed, go-langserver is running with `:LanguageClientStart`
4. Problem is intermittent. Try omnicompletion throughout a project, and on occasion, Neovim will print `Pattern not found` immediately after offering completion options (Pmenu will disappear)

## Current behavior
Neovim intermittently prints `Pattern not found` when executing omnicompletion. Interestingly, the completion options will appear briefly and then disappear, where Neovim outputs `Pattern not found`. Or, other times, completion options will not show at all.

## Expected behavior
Expect LanguageClient to supply completion options to omnicompletion without fail
muni-corn commented 5 years ago

UPDATE: Seems that starting gocode manually mitigates the issue. How can I start go-langserver and gocode at the same time under g:LanguageClient_serverCommands?