go/internal/lsp/source
Marwan Sulaiman 9f83dd3691 internal/lsp/source: use the real type parameter in snippet completions
This change makes source.FormatVarType return the instantiated type
parameter instead of the actual AST expression because that will just
refer to the abstract type parameter and not the insantiated one.
I am not sure if this covers all edge cases or if there's a better
solution but I'm happy to adjust to whatever is appropriate.

Fixes golang/go#50623

Change-Id: I6e0b2d93c47c9a0502f2995ca8d3668a9a31c056
Reviewed-on: https://go-review.googlesource.com/c/tools/+/378714
Trust: Robert Findley <rfindley@google.com>
Run-TryBot: Peter Weinberger <pjw@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Peter Weinberger <pjw@google.com>
2022-01-21 14:07:19 +00:00
..
completion gopls: add string join/split postfix completions 2022-01-11 13:55:59 +00:00
add_import.go internal/lsp: add list_known_packages and add_import commands 2021-05-23 03:57:00 +00:00
api_json.go internal/lsp/analysis/noresultvalues: update for CL 379116 error message change 2022-01-18 21:28:05 +00:00
call_hierarchy.go internal/lsp/source: check for nil objects in call hierarchy 2021-10-27 16:11:50 +00:00
code_lens.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
comment.go internal/lsp/source: refactor commentToMarkdown function 2021-05-19 23:19:09 +00:00
comment_test.go internal/lsp/source: refactor commentToMarkdown function 2021-05-19 23:19:09 +00:00
diagnostics.go internal/lsp: fix support for SourceFixAll code actions 2021-03-24 23:51:27 +00:00
extract.go internal/lsp: adjust extract function range if block statement 2021-10-22 02:18:41 +00:00
fix.go internal/lsp/source: update SuggestedFixFunc to accept source.Snapshot 2021-09-15 18:56:22 +00:00
folding_range.go internal/lsp: foldable multiline strings 2022-01-04 20:54:25 +00:00
format.go internal/lsp/source: don't format generated files 2021-12-06 16:11:25 +00:00
format_test.go internal/lsp: use source.Offset instead of tok.Offset 2021-10-12 22:12:04 +00:00
gc_annotations.go internal/lsp: key GC details off package ID 2021-03-02 22:01:38 +00:00
highlight.go internal/lsp/source: fix Highlight for std and 3rd-party packages 2021-04-05 22:17:18 +00:00
hover.go internal/lsp: use source.Offset instead of tok.Offset 2021-10-12 22:12:04 +00:00
identifier.go go/analysis/passes/usesgenerics: a new analysis to detect generic code 2021-10-12 22:26:24 +00:00
identifier_test.go internal/lsp: fix some incorrect spelling 2020-11-24 11:59:21 +00:00
implementation.go internal/lsp: use source.Offset instead of tok.Offset 2021-10-12 22:12:04 +00:00
known_packages.go internal/lsp: add list_known_packages and add_import commands 2021-05-23 03:57:00 +00:00
offset_test.go internal/lsp: use source.Offset instead of tok.Offset 2021-10-12 22:12:04 +00:00
options.go gopls/doc: fix inconsistent rendering of enum newlines 2022-01-19 15:07:38 +00:00
options_test.go gopls: consistently capitalize enum variants for symbolStyle 2021-09-03 18:04:29 +00:00
references.go internal/lsp: fix panic in find references on Error 2021-09-15 17:19:52 +00:00
rename.go internal/lsp/source: recursively search for qualified objects 2021-08-17 02:54:26 +00:00
rename_check.go internal/lsp: use LookupParent for finding scope 2021-08-11 21:39:32 +00:00
signature_help.go internal/lsp: skip signature help within a string literal 2021-07-26 16:44:13 +00:00
source_test.go internal/template: identify template files by the templateExtensions option 2022-01-13 17:30:17 +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: use the real type parameter in snippet completions 2022-01-21 14:07:19 +00:00
util.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
view.go internal/lsp: honor the file kind provided by clients for overlays 2022-01-13 20:54:45 +00:00
workspace_symbol.go internal/lsp/source: parse symbol queries when using fastfuzzy 2022-01-19 15:06:07 +00:00
workspace_symbol_test.go internal/lsp/source: parse symbol queries when using fastfuzzy 2022-01-19 15:06:07 +00:00