-
Notifications
You must be signed in to change notification settings - Fork 798
cant jump to define on mac big sur vscode #919
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
Comments
Can you please share the Go related settings you have added/edited? You can do so by running |
befor i upgrade mac to big sur, it works // user setting // workspace |
Is there a reason that you have |
it is not the reason. because use LanguageServer is slowly,. now i set useLanguageServer to true and unset gopath , it doesn't work yet. |
The extension is transitioning to always using the language server, so it's probably best to figure out why it's not working. Can you please follow the troubleshooting steps and share a log? https://github.com/golang/tools/blob/master/gopls/doc/troubleshooting.md#capturing-logs |
// workspace setting // go.mod go 1.14 // code: import (
) func main() { // log: [Trace - 23:30:16.985 PM] Received response 'initialize - (0)' in 1ms. [Trace - 23:30:17.100 PM] Sending notification 'initialized'. [Trace - 23:30:17.101 PM] Sending notification 'textDocument/didOpen'. [Trace - 23:30:17.101 PM] Received request 'window/workDoneProgress/create - (1)'. [Trace - 23:30:17.125 PM] Sending response 'window/workDoneProgress/create - (1)' in 23ms. [Trace - 23:30:17.127 PM] Received notification '$/progress'. [Trace - 23:30:17.127 PM] Received request 'workspace/configuration - (2)'. [Trace - 23:30:17.197 PM] Sending response 'workspace/configuration - (2)' in 69ms. [Trace - 23:30:17.300 PM] Received notification 'window/logMessage'. [Trace - 23:30:17.301 PM] Received request 'client/registerCapability - (3)'. [Trace - 23:30:17.328 PM] Received notification 'window/logMessage'. [Trace - 23:30:17.332 PM] Received notification '$/progress'. [Trace - 23:30:17.375 PM] Received notification 'window/logMessage'. [Info - 11:30:17 PM] 2020/11/17 23:30:17 go env for /Users/kurt/project/gocode/lcode [Info - 11:30:17 PM] 2020/11/17 23:30:17 go/packages.Load [Trace - 23:30:17.549 PM] Sending response 'client/registerCapability - (3)' in 248ms. [Trace - 23:30:17.549 PM] Sending request 'textDocument/documentSymbol - (1)'. [Trace - 23:30:17.549 PM] Received request 'client/registerCapability - (4)'. [Info - 11:30:17 PM] 2020/11/17 23:30:17 go/packages.Load [Trace - 23:30:17.843 PM] Sending response 'client/registerCapability - (4)' in 293ms. [Trace - 23:30:17.869 PM] Sending request 'textDocument/codeAction - (2)'. [Trace - 23:30:17.870 PM] Sending request 'textDocument/documentLink - (3)'. [Trace - 23:30:17.870 PM] Sending request 'textDocument/foldingRange - (4)'. [Trace - 23:30:17.870 PM] Sending request 'textDocument/codeLens - (5)'. [Trace - 23:30:17.929 PM] Received notification 'window/logMessage'. [Info - 11:30:17 PM] 2020/11/17 23:30:17 go/packages.Load [Trace - 23:30:18.261 PM] Received notification 'window/logMessage'. [Trace - 23:30:18.261 PM] Received notification 'window/logMessage'. [Trace - 23:30:18.261 PM] Sending notification '$/cancelRequest'. [Info - 11:30:18 PM] 2020/11/17 23:30:18 go/packages.Load [Trace - 23:30:18.301 PM] Received notification 'window/logMessage'. [Trace - 23:30:18.301 PM] Received notification 'window/logMessage'. [Info - 11:30:18 PM] 2020/11/17 23:30:18 go/packages.Load [Info - 11:30:18 PM] 2020/11/17 23:30:18 go/packages.Load [Info - 11:30:18 PM] 2020/11/17 23:30:18 go/packages.Load [Trace - 23:30:18.348 PM] Received notification 'window/logMessage'. [Trace - 23:30:18.377 PM] Received notification 'window/logMessage'. [Trace - 23:30:18.696 PM] Received response 'textDocument/documentSymbol - (1)' in 1147ms. [Trace - 23:30:18.701 PM] Received notification 'textDocument/publishDiagnostics'. [Trace - 23:30:18.701 PM] Received response 'textDocument/codeAction - (2)' in 831ms. [Trace - 23:30:18.714 PM] Received response 'textDocument/documentLink - (3)' in 844ms. [Trace - 23:30:18.716 PM] Received response 'textDocument/foldingRange - (4)' in 845ms. [Error - Received] 23:30:18.716 PM #5 JSON RPC cancelled [Error - 11:30:18 PM] 2020/11/17 23:30:18 command-line-arguments: no dep handle for github.com/lcode/code/code_heap: no metadata for github.com/lcode/code/code_heap [Trace - 23:30:18.743 PM] Sending request 'textDocument/codeLens - (6)'. [Trace - 23:30:18.744 PM] Received response 'textDocument/codeLens - (6)' in 0ms. [Error - 11:30:18 PM] 2020/11/17 23:30:18 command-line-arguments: no dep handle for github.com/lcode/code/code_heap: no metadata for github.com/lcode/code/code_heap [Trace - 23:30:19.065 PM] Sending request 'textDocument/codeAction - (7)'. [Trace - 23:30:19.066 PM] Received response 'textDocument/codeAction - (7)' in 0ms. [Trace - 23:30:19.614 PM] Sending request 'textDocument/documentSymbol - (8)'. [Trace - 23:30:19.615 PM] Received response 'textDocument/documentSymbol - (8)' in 0ms. [Trace - 23:30:20.942 PM] Sending request 'textDocument/definition - (9)'. [Error - Received] 23:30:20.943 PM #9 no object found for ident HeapSort: no object found [Error - 11:30:20 PM] Request textDocument/definition failed. |
It looks like your project root is |
i run "go mod init github.com/lcode" on "/Users/kurt/project/gocode/lcode" "/Users/kurt/project/gocode/lcode/src" "/Users/kurt/project/gocode/lcode/src/lcode", all of them doesn't work |
Ideally you want to have only one |
you are right, it work.but i have two question: |
I'm not sure what you mean--can you give an example? You can definitely create a module in your
You can't jump to the definition unless you already have the package downloaded on your machine, yes. If you have a specific issue you'd like to investigate, the easiest way would probably be to share another log. |
it solved. should set go.toolsEnvVars.GO111MODULE to off
i download all pkg,it work. so thank you, now can close the issue. |
os: mac big sur
go extension: 0.18.1
go:1.42 (go mod)
vscode:
Version: 1.51.1
Commit: e5a624b
Date: 2020-11-11T01:11:34.018Z
Electron: 9.3.3
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Darwin x64 20.1.0
The text was updated successfully, but these errors were encountered: