go/internal/lsp
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
..
analysis gopls, internal/lsp: support fillstruct for partially-filled structs 2020-11-30 20:22:45 +00:00
browser all: replace all usages of os/exec with golang.org/x/sys/execabs 2021-01-19 22:25:03 +00:00
cache internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
cmd internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
command internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
debug internal/lsp: display current diagnostics in the debug server 2021-01-22 19:37:57 +00:00
diff all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
fake internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
fuzzy internal/lsp/fuzzy: fix return value on no match 2020-08-28 15:37:48 +00:00
helper all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
lsprpc internal/lsp: display current diagnostics in the debug server 2021-01-22 19:37:57 +00:00
mod internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
protocol internal/lsp: eliminate funcs from commands, and refactor 2021-02-09 22:07:08 +00:00
snippet internal/lsp: offer type converted completion candidates 2020-11-30 20:04:59 +00:00
source internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
testdata internal/lsp/completion: fix untyped int type inference 2021-02-05 20:20:24 +00:00
tests internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
README.md internal/lsp: add READMEs that describe tests, how to run tests 2020-12-03 17:03:53 +00:00
call_hierarchy.go
code_action.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
code_lens.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
command.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
completion.go internal/lsp/cache: allow fixing multiple syntax errors 2021-02-05 19:47:01 +00:00
completion_test.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
debounce.go internal/lsp: add experimental support for multi-phase diagnostics 2020-10-02 14:12:12 +00:00
debounce_test.go internal/lsp: delay longer in TestDebouncer 2020-10-30 20:03:00 +00:00
definition.go
diagnostics.go internal/lsp/cache: disable network for mod tidy diagnostics 2021-02-05 19:41:14 +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
general.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
highlight.go
hover.go
implementation.go
link.go internal/lsp: add ?utm_source=gopls to links to pkg.go.dev 2020-11-16 00:15:58 +00:00
lsp_test.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
progress.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
progress_test.go
references.go
rename.go internal/lsp/source: make it an error to rename embedded fields 2021-01-26 13:52:46 +00:00
reset_golden.sh
semantic.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
server.go internal/lsp: avoid panic during interface assertion 2021-01-02 18:51:54 +00:00
server_gen.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
signature_help.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
symbols.go
text_synchronization.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
workspace.go internal/lsp: fix capability registration for semantic tokens 2020-11-16 18:11:12 +00:00
workspace_symbol.go

README.md

lsp

internal/lsp provides much of the Language Server Protocol (lsp) implementation for gopls.

Documentation for users and contributors can be found in the gopls/doc directory.