1
0
mirror of https://github.com/golang/go synced 2024-10-01 12:28:37 -06:00
go/internal/lsp/cmd
Rebecca Stambler e31b568ad1 internal/lsp: plumb fillstruct through analysis
Now that fillstruct is an analyzer, we can simplify the code that calls
it in code_action.go. We introduce a new class of analyzer --
convenience analyzers, which are closer to commands. These represent
suggestions that won't necessarily improve the quality or correctness of
your code, but they offer small helper functions for the user.

This CL also combines the refactor rewrite tests with the suggested fix
tests, since they are effectively the same.

For now, we only support convenience analyzers when a code action was
requested on the same line as the fix. I'm not sure how to otherwise
handle this without bothering the user with unnecessary diagnostics.

Change-Id: I7f0aa198b5ee9964a907d709bae6380093d4ef21
Reviewed-on: https://go-review.googlesource.com/c/tools/+/237687
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2020-06-15 21:22:08 +00:00
..
test internal/lsp: plumb fillstruct through analysis 2020-06-15 21:22:08 +00:00
capabilities_test.go internal/lsp: cancel the initial workspace load when view shuts down 2020-06-12 18:06:40 +00:00
check.go internal/span,lsp: disambiguate URIs, DocumentURIs, and paths 2020-02-14 22:51:03 +00:00
cmd_test.go internal/lsp: share common command line test functionality 2020-04-28 14:04:16 +00:00
cmd.go internal/lsp: cancel the initial workspace load when view shuts down 2020-06-12 18:06:40 +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: fix the command line query for definition 2020-04-27 20:15:23 +00:00
implementation.go internal/lsp: check for file URIs on LSP requests 2020-02-14 22:51:26 +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: print view-specific environment 2020-03-24 20:15:47 +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: use %w in error wrappers 2020-05-04 14:52:14 +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: check for file URIs on LSP requests 2020-02-14 22:51:26 +00:00
serve_test.go internal/lsp/lsprpc: automatically resolve and start the remote gopls 2020-02-24 22:51:55 +00:00
serve.go internal/jsonrpc2: change StreamServer to operate on Conn instead of Stream 2020-06-03 17:07:01 +00:00
signature.go internal/lsp/protocol: unmarshal to pointers when dispatching requests 2020-03-05 22:45:36 +00:00
suggested_fix.go internal/lsp/cmd: improve flexibility of suggested fixes 2020-03-06 14:31:35 +00:00
symbols.go internal/lsp/cmd: fix not displaying symbols result 2020-05-11 23:26:04 +00:00
workspace_symbol.go internal/lsp: add config option for SymbolMatch 2020-05-11 19:58:58 +00:00