Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/cmd/guru: add type position to 'describe' output #27308
It would be nice to have command like 'Go to type definition' in code editors. To help implement this we need to know where type of current (under cursor) identifier is defined.
So proposal is to add "typepos" to json output of describe identifier.
P.S. I am ready to create PR just wanted to discuss this before
Yes, it seems like a reasonable feature. If you send me the CL I will review it. Thank you.
BTW, longer term, the Go team at Google will maintain a canonical LSP (language server protocol) implementation, which will subsume most of the features of Guru. In hindsight some of its features such as pointer analysis-based callgraph alias queries do not carry their weight (performance, implementation complexity) and should be dropped or replaced by simpler approximations. I expect that the feature described in this issue is part of the core LSP feature set.
Great news about LSP!
Add typepos field to json output of describe command. This field shows where type of current (under cursor) identifier is defined. This will help code editors implement command 'Go to type definition'. Implements [#27308](golang/go#27308) Change-Id: I4e02ddbdc03fecec98135b8996f9562a88a9cfb8 GitHub-Last-Rev: be47e39 GitHub-Pull-Request: #50 Reviewed-on: https://go-review.googlesource.com/c/140379 Reviewed-by: Alan Donovan <firstname.lastname@example.org>