go/internal/lsp/cmd
Rob Findley 8aef11fa67 internal/lsp: switch to the new command API
Fully switch to the new generated command API, and remove the old
dynamic command configuration.

This involved several steps:
 + Switch the command dispatch in internal/lsp/command.go to go through
   the command package. This means that all commands must now use the new
   signature.
 + Update commandHandler to use the new command signatures.
 + Fix some errors discovered in the command interface now that we're
   actually using it.
 + Regenerate bindings.
 + Update all code lens and suggested fixes to new the new command
   constructors.
 + Generate values in the command package to hold command names and the
   full set of commands, so that they may be referenced by name.
 + Update any references to command names to use the command package.
 + Delete command metadata from the source package. Rename command.go to
   fix.go.
 + Update lsp tests to execute commands directly rather than use an
   internal API. This involved a bit of hackery to collect the edits.
 + Update document generation to use command metadata. Documenting the
   arguments is left to a later CL.
 + Various small fixes related to the above.

This change is intended to be invisible to users. We have changed the
command signatures, but have not (previously) committed to backwards
compatibility for commands. Notably, the gopls.test and gopls.gc_details
signatures are preserved, as these are the two cases where we are aware
of LSP clients calling them directly, not from a code lens or
diagnostic.

For golang/go#40438

Change-Id: Ie1b92c95d6ce7e2fc25fc029d1f85b942f40e851
Reviewed-on: https://go-review.googlesource.com/c/tools/+/290111
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
2021-02-09 22:09:28 +00:00
..
test all: replace all usages of os/exec with golang.org/x/sys/execabs 2021-01-19 22:25:03 +00:00
call_hierarchy.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +00:00
capabilities_test.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
check.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +00:00
cmd.go internal/lsp/cmd: add licenses command 2021-01-08 19:50:35 +00:00
cmd_test.go internal/lsp/cmd: delete TestDefinitionHelpExample test 2020-11-03 23:54:15 +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: improve help output of gopls subcommands 2021-01-25 18:56:18 +00:00
implementation.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +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 licenses command 2021-01-08 19:50:35 +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/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +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/cmd: include new name in rename help message 2020-12-28 17:52:27 +00:00
semantictokens.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
serve.go internal/lsp: fix builds and tests for go1.12+ 2020-08-27 14:30:46 +00:00
serve_test.go internal/lsp/lsprpc: automatically resolve and start the remote gopls 2020-02-24 22:51:55 +00:00
signature.go internal/lsp/cmd: improve help output of gopls subcommands 2021-01-25 18:56:18 +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.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
workspace_symbol.go internal/lsp: add config option for SymbolMatch 2020-05-11 19:58:58 +00:00