1
0
mirror of https://github.com/golang/go synced 2024-11-18 21:44:45 -07:00
go/internal/lsp
Muir Manders 79994da4ae internal/lsp: fix VSCode's reordering of completion candidates
When VSCode applies its own fuzzy matching/filtering/ranking logic to
completion candidates, it can end up reordering and even omitting some
of our candidates. It is mainly a problem with deep completions (i.e.
VSCode downranks or completely hides deep completion candidates that
should be ranked at the top).

We now trick VSCode into not reordering our candidates by setting each
candidate's "filterText" to the completion prefix. This makes every
candidate look like an identically perfect match, so VSCode just
maintains the order specified by "sortText".

Note that we don't do this trick if server side fuzzy matching and
deep completions are disabled. In this case unimpeded client side
candidate filtering is necessary.

Change-Id: I677047bca12b9ce05a953016d0d89182f1fe44d6
Reviewed-on: https://go-review.googlesource.com/c/tools/+/202717
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
2019-10-24 16:29:03 +00:00
..
browser
cache internal/lsp: don't associate package with snapshot 2019-10-23 20:24:04 +00:00
cmd internal/lsp: cancel early 2019-10-22 07:49:31 +00:00
debug internal/lsp: address staticcheck warnings 2019-10-04 02:16:23 +00:00
diff internal/lsp: fix unified diffs of edits at the end of a file 2019-10-11 16:38:14 +00:00
fuzzy internal/lsp: fix fuzzy matcher inconsistency 2019-10-22 21:05:28 +00:00
protocol internal/lsp: cancel early 2019-10-22 07:49:31 +00:00
snippet all: fix broken links to LSP specification 2019-10-02 18:32:53 +00:00
source internal/lsp: don't associate package with snapshot 2019-10-23 20:24:04 +00:00
telemetry
testdata internal/lsp: improve completion for *ast.ArrayTypes 2019-10-23 16:34:50 +00:00
tests internal/lsp: use the AST to get correct ranges 2019-10-22 16:21:03 +00:00
code_action.go internal/lsp: don't offer empty "Organize Imports" action 2019-10-23 19:47:20 +00:00
command.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
completion_test.go internal/imports: return non-stdlib candidates from GetAllCandidates 2019-10-21 20:45:15 +00:00
completion.go internal/lsp: fix VSCode's reordering of completion candidates 2019-10-24 16:29:03 +00:00
definition.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
diagnostics.go go/analysis, internal/lsp: add support for related information 2019-10-21 19:00:55 +00:00
folding_range.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
format.go
general.go internal/lsp: modify approach to watching changed files 2019-10-22 21:33:45 +00:00
highlight.go
hover.go internal/lsp: convert comments to markdown before sending to client 2019-10-04 18:35:38 +00:00
link.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
lsp_test.go internal/lsp: add a test to make sure we handle bad imports 2019-10-17 20:52:05 +00:00
references.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
rename.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
reset_golden.sh internal/lsp: fix regeneration of golden files 2019-09-25 13:16:59 +00:00
server.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
signature_help.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
symbols.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
text_synchronization.go internal/lsp: rework snapshots and cache FileHandles per-snapshot 2019-10-01 16:26:22 +00:00
watched_files.go internal/lsp: modify approach to watching changed files 2019-10-22 21:33:45 +00:00
workspace.go internal/lsp: merge session and view options into one 2019-09-11 19:36:49 +00:00