Open a go file with vim.
No errors and using :GoDef should work
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
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
Commit 26c00294a0726ebfe80174f310b868af5e0f2042
: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 go1.13.8 linux/amd64
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
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']
Most helpful comment
Solution: Make sure
polyglotis loaded aftervim-goand setlet g:polyglot_disabled = ['go']