mirror of
https://github.com/golang/go
synced 2024-11-18 13:24:39 -07:00
b793a1359e
* Adds outgoing calls call hierarchy for function declarations to gopls. Returns all call ranges and call items for functions/literals being called. * Adds tests for outgoing call. * Updates cmd to account for call ranges and call items being in different files for outgoing calls. * Updates prepare call hierarchy to return declaration as root instead of cursor position. Example: Example shows https://github.com/golang/tools/blob/master/internal/lsp/source/call_hierarchy.go Show Call Hierarchy View: https://imgur.com/a/DA5vc6l Peek Call Hierarchy View: https://imgur.com/a/fuiG0Be Note: * While incoming calls for a function defined in an interface return references to that function, outgoing calls don't return anything since we don't know what implementation to return outgoing calls for.* Outgoing calls to function literals show as variable name used to define the literal, compared to <scope>.func() for incoming calls. Change-Id: Ib8afbd8617675d12952db0b80170ada5988e90ab Reviewed-on: https://go-review.googlesource.com/c/tools/+/248537 Run-TryBot: Danish Dua <danishdua@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Heschi Kreinick <heschi@google.com> |
||
---|---|---|
.. | ||
test | ||
call_hierarchy.go | ||
capabilities_test.go | ||
check.go | ||
cmd_test.go | ||
cmd.go | ||
definition.go | ||
export_test.go | ||
folding_range.go | ||
format.go | ||
highlight.go | ||
implementation.go | ||
imports.go | ||
info.go | ||
inspect.go | ||
links.go | ||
prepare_rename.go | ||
references.go | ||
rename.go | ||
serve_test.go | ||
serve.go | ||
signature.go | ||
suggested_fix.go | ||
symbols.go | ||
workspace_symbol.go |