You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What did you do? (required: The issue will be closed when not provided)
Introduce syntax error:
package main
funcmain() {
syntaxerror=123
}
What did you expect to happen?
Syntax error get highlighted.
What happened instead?
Syntax error did not get highlighted.
Debug output:
{"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"uri":"file:///tmp/test.go","version":24,"diagnostics":[{"range":{"start":{"line":2,"character":5},"end":{"line":2,"character":9}},"severity":1,"code":"DuplicateDecl","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#DuplicateDecl"},"source":"compiler","message":"main redeclared in this block","relatedInformation":[{"location":{"uri":"file:///tmp/foo.go","range":{"start":{"line":4,"character":5},"end":{"line":4,"character":9}}},"message":"other declaration of main"}]},{"range":{"start":{"line":3,"character":1},"end":{"line":3,"character":12}},"severity":1,"code":"UndeclaredName","codeDescription":{"href":"https://pkg.go.dev/golang.org/x/tools/internal/typesinternal#UndeclaredName"},"source":"compiler","message":"undeclared name: syntaxerror"}]}}
Also I get errors when trying to GoUpdateBinaries. I don't know if this is related. The error is:
vim-go: Error installing golang.org/x/tools/gopls@latest: golang.org/x/exp/constraints
vim-go: golang.org/x/exp/maps
vim-go: # golang.org/x/exp/constraints
vim-go: /home/shang/go/pkg/mod/golang.org/x/[email protected]/constraints/constraints.go:13:2: embedding interface
element ~int|~int8|~int16|~int32|~int64 requires go1.18 or later (-lang was set to go1.16; check go.mod)
vim-go: /home/shang/go/pkg/mod/golang.org/x/[email protected]/constraints/constraints.go:20:2: embedding interface
<...truncated...>
The error you're seeing on : GoUpdateBinaries is unrelated. To deal with that, see #3446 and #3449. If you'll update to the latest master revision of vim-go, you will be able to update the tools.
What did you do? (required: The issue will be closed when not provided)
Introduce syntax error:
What did you expect to happen?
Syntax error get highlighted.
What happened instead?
Syntax error did not get highlighted.
Debug output:
Also I get errors when trying to
GoUpdateBinaries
. I don't know if this is related. The error is:Configuration (MUST fill this out):
Default
vim-go version:
v1.26
vimrc
you used to reproduce:vimrc
Vim version (first three lines from
:version
):VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Mar 30 2022 23:54:07)
Included patches: 1-4651
Compiled by Arch Linux
Go version (
go version
):go version go1.19.3 linux/amd64
Go environment
go env
Output:gopls version
gopls version
Output:The text was updated successfully, but these errors were encountered: