'Go To Definition (Ctrl + Click) in VS Code v1.45.1 with Go v1.14.1 and Ubuntu 20.04 not working
I tried everything mentioned in below ling
https://github.com/microsoft/vscode-go/issues/3072
I updated godef
as suggested and installed gopls
, but nothing worked for me. Anyone facing a similar issue?
Solution 1:[1]
I had the same issue using Go 1.16.8.
Use Alt + Click
Solution 2:[2]
I think the answer may vary based on what OS you're running, but what worked for me in WSL2 (Linux) was deleting the package rogpeppe under go>package>mod>github.com within VS Code and reinstalling it by running the following command go get -v github.com/rogpeppe/godef
Solution 3:[3]
I just got the same issue, with VSCode 1.66.2 and vscode-go 0.33. (May 2022)
Ctrl+click stopped working, and was replaced with Alt+Click.
To restore the usual behavior:
- open the settings (Ctrl+,)
- type multi cursor mod
- switch from
ctrlCmd
toalt
.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | ZygD |
Solution 2 | stayhydrated03 |
Solution 3 | VonC |