go/internal/lsp/source
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
..
completion internal/lsp/completion: fix untyped int type inference 2021-02-05 20:20:24 +00:00
api_json.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
call_hierarchy.go internal/lsp/source: return all field funcs from outgoing callhierarchy 2021-01-05 17:25:16 +00:00
code_lens.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
comment.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
comment_test.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
diagnostics.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
extract.go internal/lsp: eliminate funcs from commands, and refactor 2021-02-09 22:07:08 +00:00
fix.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
folding_range.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
format.go internal/lsp, gopls: recover from go-diff panics 2020-12-17 16:56:54 +00:00
format_test.go all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
gc_annotations.go internal/lsp: remove redundant fields/code after source.Error deletion 2021-02-02 23:37:55 +00:00
highlight.go internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
hover.go internal/lsp: add ?utm_source=gopls to links to pkg.go.dev 2020-11-16 00:15:58 +00:00
identifier.go internal/lsp: fix godef for embedded type aliases 2020-11-23 15:59:28 +00:00
identifier_test.go internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
implementation.go internal/lsp/source: move completion to its own package 2020-09-08 19:19:08 +00:00
options.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
options_test.go internal/lsp: restructure user options (CL 278433 continued) 2020-12-30 21:54:22 +00:00
references.go internal/lsp/source: rename uses of embedded fields 2021-01-12 21:27:35 +00:00
rename.go internal/lsp/source: make it an error to rename embedded fields 2021-01-26 13:52:46 +00:00
rename_check.go internal/lsp: remove the source.Error type 2021-02-02 20:40:51 +00:00
signature_help.go internal/lsp/source: respect user's hover kind in signature help 2020-10-29 22:52:41 +00:00
source_test.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
symbols.go internal/lsp: don't show blank identifiers in outline 2020-10-09 01:09:51 +00:00
types_format.go internal/lsp/source: fix default param name generation 2020-12-07 19:19:02 +00:00
util.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
view.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
workspace_symbol.go internal/lsp/source: simplify workspace symbol package collection 2020-12-07 18:57:54 +00:00
workspace_symbol_test.go internal/lsp/source: support some fzf-like tokens in symbol matching 2020-09-08 16:35:05 +00:00