-
Notifications
You must be signed in to change notification settings - Fork 17.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
x/tools/internal/lsp: doesn't work with VS Code on Windows #30967
Comments
Can confirm the same on Windows 10, Visual Studio Code 1.32.3 and Go 1.12.1. I have the following file under a directory package main
import "fmt"
func main() {
fmt.Println("hey")
} And when I try anything that invokes gopls, it says "no file information for main.go" with code 0. I tried placing the I'm using the VSCode settings recommended in the wiki. |
Handling the filepath escaping on Windows has proven to be fairly confusing - I thought we got it right at some point, but looks like we didn't. I'll try to investigate when I have access to a Windows machine, which will be early next week. |
Change https://golang.org/cl/169703 mentions this issue: |
@stamblerre I have tried the latest gopls with go get -u, This issue still exists. What version of Go are you using (
|
@NzKSO: |
@stamblerre gopls still doesn't work even if I enable go module for projects that are outside $GOPATH, the go-langserver output is same as previous. |
Why is this closed? This is still happening, at least on macOS/VSCode using |
@Robula: I'm not sure what you are referring to - the issue was about |
Do we have a separate issue? |
@divmgl: do you mind opening a separate issue in the Go issue tracker so that I can help you diagnose your problem? |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes, on Windows, but not on a Mac with the same versions of all the components shown above and the same go.* VS Code configuration entries shown below.
What operating system and processor architecture are you using (
go env
)?go env
OutputVS Code config (go.* entries):
What did you do?
Tried to use gopls with VSCode on Windows
What did you expect to see?
A popup showing information about the
fmt.Println
function.What did you see instead?
Nothing in the editor panel.
But also, VS Code's
go-langserver
output panel logged the following details showing several errors:The text was updated successfully, but these errors were encountered: