go/internal/lsp/regtest
Robert Findley 4d0b383458 internal/lsp/regtest: minor cleanup for magic regtest envvar
For some reason, we were not reusing the constant runTestAsGoplsEnvVar
in the regtest Main function. Fix this, add a bit more commentary, and
check the envvar before doing anything else. Also fix the threading of
hooks to the created gopls server.

Tested manually via -enable_gopls_subprocess_tests.

Change-Id: Ieb5329aa5850e845f4d9e3868703bfa16387bce3
Reviewed-on: https://go-review.googlesource.com/c/tools/+/420716
Reviewed-by: Hyang-Ah Hana Kim <hyangah@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
2022-08-02 16:05:48 +00:00
..
doc.go gopls, internal/lsp: gofmt 2022-04-12 17:41:31 +00:00
env.go internal/lsp/regtest: simplify, consolidate, and document settings 2022-07-12 16:56:46 +00:00
env_test.go internal/lsp/regtest: add a benchmark for didChange 2021-05-06 02:57:18 +00:00
expectation.go internal/lsp/cache: report a critical error when go.work is invalid 2022-07-27 18:59:40 +00:00
regtest.go internal/lsp/regtest: minor cleanup for magic regtest envvar 2022-08-02 16:05:48 +00:00
runner.go internal/lsp/regtest: remove arbitrary timeout for closing the editor 2022-07-28 20:06:00 +00:00
wrappers.go internal/lsp/regtest: simplify, consolidate, and document settings 2022-07-12 16:56:46 +00:00