1
0
mirror of https://github.com/golang/go synced 2024-10-01 01:08:33 -06:00
go/internal/lsp/regtest
Rob Findley cb8d9cd245 internal/lsp: support configurable codeLens
Some code lenses may be undesirable for certain users or editors -- for
example a code lens that runs tests, when VSCode already supports this
functionality outside of the LSP. To handle such situations, support
configuring code lenses via a new 'codelens' gopls option.

Add support for code lens in regtests, and use this to test the new
configuration. To achieve this, thread through a new 'EditorConfig' type
that configures the fake editor's LSP session. It made sense to move the
test Env overlay onto this config object as well.

While looking at them, document some types in source.Options.

Change-Id: I961077422a273829c5cbd83c3b87fae29f77eeda
Reviewed-on: https://go-review.googlesource.com/c/tools/+/232680
Run-TryBot: Robert Findley <rfindley@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
2020-05-08 18:47:35 +00:00
..
codelens_test.go internal/lsp: support configurable codeLens 2020-05-08 18:47:35 +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_114_test.go internal/lsp/regtest: add regtest for golang/go#38207 2020-04-22 01:51:11 +00:00
diagnostics_test.go internal/lsp: support configurable codeLens 2020-05-08 18:47:35 +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: support configurable codeLens 2020-05-08 18:47:35 +00:00
formatting_test.go internal/lsp/fake: split up and rename the Workspace type 2020-05-06 18:17:57 +00:00
generate_test.go internal/lsp/regtest: add support for testing generate commands 2020-05-04 19:25:30 +00:00
reg_test.go internal/lsp/regtest: generalize expectations beyond diagnostic messages 2020-04-16 21:39:01 +00:00
runner.go internal/lsp: support configurable codeLens 2020-05-08 18:47:35 +00:00
serialization_test.go internal/lsp/fake: split up and rename the Workspace type 2020-05-06 18:17:57 +00:00
shared_test.go internal/lsp: support configurable codeLens 2020-05-08 18:47:35 +00:00
unix_test.go internal/lsp: support configurable codeLens 2020-05-08 18:47:35 +00:00
wrappers.go internal/lsp: support configurable codeLens 2020-05-08 18:47:35 +00:00