go/internal/lsp/source/completion
Robert Findley de3ef4aa45 internal/lsp/source: remove workaround for newline terminated files
Eliminate the need to work around newline terminated files in
completion, by storing selection ranges as token.Pos and using an
lsppos.TokenMapper derived from the file content, which does not have
problems with newline termination.

This simplifies the completion logic, and removes the last use of
MappedRange.SpanRange, which is an inconisitent API in that it returns
positions in the compiled source, rather than edited source.

Change-Id: I65232787956325172b48fd42d85cbb598039ee5a
Reviewed-on: https://go-review.googlesource.com/c/tools/+/407889
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Robert Findley <rfindley@google.com>
gopls-CI: kokoro <noreply+kokoro@google.com>
2022-06-01 15:40:59 +00:00
..
builtin.go lsp/completion: support completing to Elem() types 2021-06-09 15:58:30 +00:00
completion.go internal/lsp/source: remove workaround for newline terminated files 2022-06-01 15:40:59 +00:00
deep_completion.go all: fix spelling 2022-04-04 19:50:34 +00:00
deep_completion_test.go
definition.go internal/lsp/source: remove workaround for newline terminated files 2022-06-01 15:40:59 +00:00
format.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
fuzz.go internal/completion: default to regular completion for f.Fuzz without f.Add 2022-03-16 01:41:57 +00:00
keywords.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
labels.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
literal.go lsp/completion: fix func literals with type params 2022-04-26 14:19:52 +00:00
package.go internal/lsp/source: remove workaround for newline terminated files 2022-06-01 15:40:59 +00:00
package_test.go internal/lsp/source/completion: suggest only valid package names 2021-04-27 19:53:45 +00:00
postfix_snippets.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
printf.go all: fix spelling 2022-04-04 19:50:34 +00:00
printf_test.go internal/lsp/source/completion: remove "completion_" prefix from files 2020-10-30 17:45:15 +00:00
snippet.go internal/lsp: add snippet completion for function type parameters 2022-03-09 15:55:38 +00:00
statements.go gopls, internal/lsp: gofmt 2022-04-12 17:41:31 +00:00
util.go internal/lsp/source/completion: use typeutil.Map for short-circuiting 2022-05-06 16:24:14 +00:00
util_test.go