1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:48:32 -06:00
go/internal/lsp/regtest
Rob Findley aa94e735be internal/lsp/source: add a new symbolStyle configuration option
Add a symbolStyle configuration option, and use it to parameterize the
following behavior when computing workspace symbols:

 + package (default): include package name in the workspace symbol.
 + full: fully qualify the symbol by import path
 + dynamic: use as the symbol the shortest suffix of the full path that
   contains the match.

To implement this, expose package name in the source.Package interface.
To be consistent with other handling in the cache package, define a new
cache.packageName named string type, to avoid confusion with packageID
or packagePath (if confusing those two identifiers was a problem, surely
it is a potential problem for package name as well).

Change-Id: Ic8ed6ba5473b0523b97e677878e5e6bddfff10a7
Reviewed-on: https://go-review.googlesource.com/c/tools/+/236842
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Paul Jolly <paul@myitcv.org.uk>
2020-06-26 17:13:37 +00:00
..
codelens_test.go internal/lsp: don't use -modfile for go mod commands 2020-06-22 20:30:43 +00:00
definition_test.go internal/lsp/regtest: put testing.T back in the test func signature 2020-04-14 18:42:46 +00:00
diagnostics_test.go internal/lsp: add a new regtest to reproduce golang/go#39646 2020-06-26 03:28:29 +00:00
doc.go internal/lsp/regtest: add expository package documentation 2020-04-28 21:10:48 +00:00
env_test.go internal/lsp: instrument work done reporting to use in regtests 2020-04-28 20:46:32 +00:00
env.go internal/lsp/lsprpc: forward the go environment in initialize requests 2020-06-16 15:43:56 +00:00
formatting_test.go internal/lsp: fix formatting edge cases (36824) 2020-05-26 20:56:00 +00:00
generate_test.go internal/lsp/regtest: add support for testing generate commands 2020-05-04 19:25:30 +00:00
imports_test.go all: rework goimports environment, support GOMODCACHE 2020-06-25 17:33:20 +00:00
link_test.go internal/lsp: honor GOPRIVATE in documentLinks and go.mod hovers 2020-06-18 13:42:42 +00:00
modfile_test.go all: rework goimports environment, support GOMODCACHE 2020-06-25 17:33:20 +00:00
reg_test.go internal/lsp/regtest: print RPC logs when verbose output is enabled 2020-06-11 19:16:16 +00:00
runner.go internal/lsp/lsprpc: forward the go environment in initialize requests 2020-06-16 15:43:56 +00:00
shared_test.go internal/lsp: support configurable codeLens 2020-05-08 18:47:35 +00:00
symbol_helper_test.go internal/lsp/fake: define Symbol method on Editor 2020-05-11 20:27:07 +00:00
symbol_test.go internal/lsp/source: add a new symbolStyle configuration option 2020-06-26 17:13:37 +00:00
unix_test.go internal/lsp/regtest: add a t.Skip for golang/go#36824 regtest 2020-05-21 15:57:04 +00:00
vendor_test.go internal/lsp: support go mod vendor as a command 2020-06-04 18:33:45 +00:00
wrappers.go internal/lsp: add a new regtest to reproduce golang/go#39646 2020-06-26 03:28:29 +00:00