After a very long time updated vim-go, and openen nvim at a project, and opened a go file.
No error, making the a smooth file opening
Endless erros:
Error detected while processing /home/ik/.config/nvim/plugged/vim-go/plugin/go.vim:
line 17:
E117: Unknown function: go#config#VersionWarning
E15: Invalid expression: go#config#VersionWarning() != 0 && (v:version < 704 || (v:version == 704 && !has('patch2009'))) && !has('nvim')
Error detected while processing /home/ik/.config/nvim/plugged/vim-go/syntax/go.vim:
line 64:
E117: Unknown function: go#config#FoldEnable
E15: Invalid expression: go#config#FoldEnable('comment')
line 74:
E117: Unknown function: go#config#HighlightGenerateTags
E15: Invalid expression: go#config#HighlightGenerateTags()
line 99:
E117: Unknown function: go#config#HighlightStringSpellcheck
E15: Invalid expression: go#config#HighlightStringSpellcheck()
line 107:
E117: Unknown function: go#config#HighlightFormatStrings
E15: Invalid expression: go#config#HighlightFormatStrings()
line 135:
E117: Unknown function: go#config#FoldEnable
E15: Invalid expression: go#config#FoldEnable('block')
line 142:
E117: Unknown function: go#config#FoldEnable
E15: Invalid expression: go#config#FoldEnable('import')
line 149:
E117: Unknown function: go#config#FoldEnable
E15: Invalid expression: go#config#FoldEnable('varconst')
line 192:
E117: Unknown function: go#config#HighlightArrayWhitespaceError
E15: Invalid expression: go#config#HighlightArrayWhitespaceError()
line 197:
E117: Unknown function: go#config#HighlightChanWhitespaceError
E15: Invalid expression: go#config#HighlightChanWhitespaceError()
line 215:
E117: Unknown function: go#config#HighlightExtraTypes
E15: Invalid expression: go#config#HighlightExtraTypes()
line 224:
E117: Unknown function: go#config#HighlightSpaceTabError
E15: Invalid expression: go#config#HighlightSpaceTabError()
line 229:
E117: Unknown function: go#config#HighlightTrailingWhitespaceError
E15: Invalid expression: go#config#HighlightTrailingWhitespaceError()
line 247:
E117: Unknown function: go#config#HighlightOperators
E15: Invalid expression: go#config#HighlightOperators()
line 266:
E117: Unknown function: go#config#HighlightFunctions
E15: Invalid expression: go#config#HighlightFunctions() || go#config#HighlightFunctionArguments()
line 287:
E117: Unknown function: go#config#HighlightFunctionCalls
E15: Invalid expression: go#config#HighlightFunctionCalls()
line 293:
E117: Unknown function: go#config#HighlightFields
E15: Invalid expression: go#config#HighlightFields()
line 299:
E117: Unknown function: go#config#HighlightTypes
E15: Invalid expression: go#config#HighlightTypes()
line 315:
E117: Unknown function: go#config#HighlightVariableAssignments
E15: Invalid expression: go#config#HighlightVariableAssignments()
line 321:
E117: Unknown function: go#config#HighlightVariableDeclarations
E15: Invalid expression: go#config#HighlightVariableDeclarations()
line 327:
E117: Unknown function: go#config#HighlightBuildConstraints
...
vim-go version:
fb173c3a849fdc47a2
vimrc you used to reproduce (use a minimal vimrc with other plugins disabled; do not link to a 2,000 line vimrc):
Removed my vim-go configuration and it still happened, without vim-go as a plugin (using vim-plug) at all, it does not happen.
My .vimrc file is big :) https://github.com/ik5/dotvim
Vim version (first three lines from :version):
NVIM v0.3.1 under arch linux.
Go version (go version):
go version go1.11 linux/amd64
Go environment (go env):
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/ik/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/ik/projects/go_resources/"
GOPROXY=""
GORACE=""
GOROOT="/usr/lib/go"
GOTMPDIR=""
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build654988256=/tmp/go-build -gno-record-gcc-switches"
It appears that you did not get the autoload/go/config.vim file. How did you update vim-go?
:PlugUpdate, however going to the library i do find it:
-rw-r--r-- 1 ik ik 12K Sep 7 21:28 /home/ik/.config/nvim/plugged/vim-go/autoload/go/config.vim, and following the history it's on fb173c3a84
Does this still happen? It seems like your setup is borked. I've tested it now with vim-plug and NVIM v0.3.1 and don't see any issues. I recommend you completely delete anything vim-go related and do a clean installation.
yes, it is still broken, without any configuration file for vim-go, and I have updated to the latest at the moment 9254470514, I'll see maybe I'm missing something
the good news that it's not vim-go, I will update here the solution once I'll find it to help others.
Thank you!
To help other, here is the issue I found at the end (It's not vim-go, but miss-configuration of mine).
The issue was miss-configuration from my side.
init.vim still pointed to .vimrc instead of it's own path, and I haven't used vim for a year now.
My issue was this:
set runtimepath+=~/.vim,~/.vim/after
set packpath+=~/.vim
source ~/.vimrc
Instead fixed it: https://github.com/ik5/dotvim/blob/master/init.vim
It also means that new plugins not always were loaded from the right path, and not it fixed at my own configuration.
Just a heads up for anyone who uses https://github.com/sheerun/vim-polyglot and vim-go, and is seeing errors like this. You might see a similar error if you have both installed, even if you've disabled vim-polyglot for Go.
If it's a conflict with vim-polyglot, try loading that after vim-go. See https://github.com/sheerun/vim-polyglot/issues/309.
Most helpful comment
Just a heads up for anyone who uses https://github.com/sheerun/vim-polyglot and vim-go, and is seeing errors like this. You might see a similar error if you have both installed, even if you've disabled vim-polyglot for Go.