vscode: How to search in installed package?

Viewed 46

I want to search in the go pkg go-git.

ctrl+shift+f searches only in my module.

how-to-search-in-installed-package

1 Answers

Probably this will not directly answer, but it's an workaround, that I personally prefer:

Hovering over a function, that is from a foreign package, VS Code shows the godoc description. There is always a link to pkg.go.dev (This link is for the PlainClone example):

VS CODE Hovering

Following it you are redirected directly to GO's package website. Here is already a nice list with the module's functions.

if you want to dive deeper: On the top of the repository there is the link to the repo host.

go pkg website

Experiences show, that this is mostly Github. While GitHub's search used to be proscribed, it can nowadays be a mightful tool:

https://docs.github.com/en/search-github/searching-on-github/searching-code#search-within-a-users-or-organizations-repositories

Again I mention that is very subjective, but GO's complex way of storing modules locally with it's many env variables and stuff made me feel using the internet is more comfortable =)

Related