go/internal/lsp
Heschi Kreinick c0b9fb59f7 internal/lsp/analysis/undeclaredname: suppress impossible quick fixes
Reading the code and running the tests, it appears we only support quick
fixes for undeclared name errors inside function bodies. Don't offer
them in other places.

The specific situation raised was type constraints, so that's what I
tested even though the problem was much broader. Also add actual error
messages where we had empty strings.

Fixes golang/go#50935.

Change-Id: I8dadcb6e4301bf22cbe7fe5d66064aafeef02690
Reviewed-on: https://go-review.googlesource.com/c/tools/+/384117
Trust: Heschi Kreinick <heschi@google.com>
Run-TryBot: Heschi Kreinick <heschi@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2022-02-09 19:35:26 +00:00
..
analysis internal/lsp/analysis/undeclaredname: suppress impossible quick fixes 2022-02-09 19:35:26 +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/cache: set types.Config.GoVersion 2022-02-07 18:19:30 +00:00
cmd internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
command internal/lsp: add ListImports 2022-02-04 22:09:29 +00:00
debug internal/lsp/debug: add go version to gopls version output 2022-02-07 15:39:03 +00:00
diff all: add copyright notices to files that are missing them 2021-01-06 17:23:47 +00:00
fake internal/lsp/fake: retry ioutil.ReadFile on plan9 if it fails due to exclusive use 2022-02-03 05:59:13 +00:00
fuzzy internal/lsp/source: parse symbol queries when using fastfuzzy 2022-01-19 15:06:07 +00:00
helper internal/lsp/protocol: update LSP definitions and stubs 2021-10-05 16:44:45 +00:00
lsppos internal/lsp/source: compute imports text edits from scratch 2021-07-22 17:13:07 +00:00
lsprpc internal/lsp/lsprpc: increase timeout for TestEnvForwarding 2021-11-11 03:25:14 +00:00
mod gopls: remove the workspace_metadata command 2022-02-04 14:02:58 +00:00
progress internal/lsp: move the progress tracker to the session 2021-06-16 01:01:29 +00:00
protocol internal/lsp: bring the LSP stubs up to date 2022-01-19 14:58:28 +00:00
regtest internal/lsp/cache: fixes for workspace invalidation 2022-02-04 14:02:15 +00:00
snippet internal/lsp/source/completion: add postfix snippet completions 2021-03-29 17:27:46 +00:00
source internal/lsp/source: provide full documentation of builtin types 2022-02-08 17:01:10 +00:00
template internal/template: return available semantic tokens even on template error 2022-01-26 20:10:56 +00:00
testdata internal/lsp/source: provide full documentation of builtin types 2022-02-08 17:01:10 +00:00
tests internal/lsp/tests: re-enable MultiModule tests on plan9 2022-01-07 05:34:58 +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: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
code_lens.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
command.go internal/lsp: add ListImports 2022-02-04 22:09:29 +00:00
completion.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
completion_test.go internal/lsp/completion: move postfix completions behind option 2021-03-29 18:55:49 +00:00
debounce.go internal/lsp: adopt bcmills' suggestion for an improved debouncer API 2021-07-13 16:40:23 +00:00
debounce_test.go internal/lsp: adopt bcmills' suggestion for an improved debouncer API 2021-07-13 16:40:23 +00:00
definition.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
diagnostics.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +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: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
general.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
highlight.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
hover.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
implementation.go
link.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
lsp_test.go gopls: remove the workspace_metadata command 2022-02-04 14:02:58 +00:00
references.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
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: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
server.go internal/lsp: add a setting to batch didChangeWatchedFile notifications 2021-07-08 19:55:54 +00:00
server_gen.go internal/lsp: bring the LSP stubs up to date 2022-01-19 14:58:28 +00:00
signature_help.go internal/lsp: update to latest version of LSP protocol 2021-02-02 11:32:59 +00:00
symbols.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
text_synchronization.go internal/lsp: signal diagnostic completion if modification failed 2021-07-13 20:49:08 +00:00
workspace.go gopls: remove the workspace_metadata command 2022-02-04 14:02:58 +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.