Vim-go: Latest version breaks integration with golsp

Created on 22 Feb 2020  路  4Comments  路  Source: fatih/vim-go

What did you do? (required: The issue will be closed when not provided)

Open a go file with vim.

What did you expect to happen?

No errors and using :GoDef should work

What happened instead?

Error message on start:

vim-go: initializing gopls
vim-go: initialized gopls
Error detected while processing function 15[8]..16[4]..go#lsp#message#ConfigurationResult:
line   15:
E117: Unknown function: go#config#GoplsMatcher

Configuration (MUST fill this out):

let g:go_fmt_command = "goimports"
let g:go_fmt_fail_silently = 1
let g:go_def_mode = 'gopls'
let g:go_info_mode = 'gopls'
let g:go_rename_command = 'gopls'
let g:go_metalinter_command = 'golangci-lint'
" neomake already run this on save
let g:go_metalinter_autosave = 0
let g:go_code_completion_enabled = 0
let g:go_highlight_build_constraints = 1

vim-go version:

Commit 26c00294a0726ebfe80174f310b868af5e0f2042

Vim version (first three lines from :version):

VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Jan 26 2020 11:45:38)
Included patches: 1-148
Compiled by Arch Linux

Go version (go version):

go version go1.13.8 linux/amd64

gopls version

gopls version Output:


golang.org/x/tools/gopls v0.3.2
golang.org/x/tools/[email protected] h1:eP1aj1AvT6ynElQH6KP0mmOT2gnWa1gYclHL4wGUbMo=

Reverting to commit 7d21c2e1ae31d31f61a0f2adec9bddc70ec0c465 fixes the issue

Most helpful comment

Solution: Make sure polyglot is loaded after vim-go and set let g:polyglot_disabled = ['go']

All 4 comments

Are you using polyglot?

Are you using polyglot?

Yes I do, does it conflict with vim-go?

When new options are added to vim-go, it conflicts, yes. See :help go-troubleshooting

Solution: Make sure polyglot is loaded after vim-go and set let g:polyglot_disabled = ['go']

Was this page helpful?
0 / 5 - 0 ratings

Related issues

svanharmelen picture svanharmelen  路  3Comments

zhangjing picture zhangjing  路  3Comments

johnzeng picture johnzeng  路  3Comments

preslavmihaylov picture preslavmihaylov  路  3Comments

derekchiang picture derekchiang  路  3Comments