1
0
mirror of https://github.com/golang/go synced 2024-11-18 13:24:39 -07:00
go/internal/lsp/cmd
Danish Dua b793a1359e internal/lsp: add outgoing calls call hierarchy
* 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>
2020-08-20 01:08:01 +00:00
..
test internal/lsp: add outgoing calls call hierarchy 2020-08-20 01:08:01 +00:00
call_hierarchy.go internal/lsp: add outgoing calls call hierarchy 2020-08-20 01:08:01 +00:00
capabilities_test.go internal/lsp: cancel the initial workspace load when view shuts down 2020-06-12 18:06:40 +00:00
check.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00
cmd_test.go internal/lsp: share common command line test functionality 2020-04-28 14:04:16 +00:00
cmd.go internal/lsp/cmd: make -remote consistent across commands 2020-08-12 19:50:22 +00:00
definition.go internal/lsp/cmd: fix the command line query for definition 2020-04-27 20:15:23 +00:00
export_test.go internal/lsp: refactor query definition test to allow adding a new test 2019-03-18 20:06:54 +00:00
folding_range.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00
format.go internal/lsp: address staticcheck warnings 2019-10-04 02:16:23 +00:00
highlight.go internal/lsp/cmd: fix the command line query for definition 2020-04-27 20:15:23 +00:00
implementation.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
imports.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
info.go internal/lsp/cmd: add a -vv flag for higher verbosity 2020-07-11 15:58:55 +00:00
inspect.go internal/lsp/cmd: use JSON output for the inspect subcommand 2020-05-11 18:25:40 +00:00
links.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00
prepare_rename.go internal/lsp: use %w in error wrappers 2020-05-04 14:52:14 +00:00
references.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
rename.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
serve_test.go internal/lsp/lsprpc: automatically resolve and start the remote gopls 2020-02-24 22:51:55 +00:00
serve.go internal/lsp/cmd: suppress EOF errors in serve 2020-08-19 19:37:42 +00:00
signature.go internal/lsp/protocol: unmarshal to pointers when dispatching requests 2020-03-05 22:45:36 +00:00
suggested_fix.go internal/lsp: move undeclaredname suggested fix out of analysis 2020-07-23 23:54:27 +00:00
symbols.go internal/lsp/cmd: fix not displaying symbols result 2020-05-11 23:26:04 +00:00
workspace_symbol.go internal/lsp: add config option for SymbolMatch 2020-05-11 19:58:58 +00:00