go/internal/lsp/source
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
..
completion internal/lsp/source: remove workaround for newline terminated files 2022-06-01 15:40: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 gopls/internal/vulncheck: copy logic of govulncheck -html 2022-05-12 21:17:31 +00:00
call_hierarchy.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
code_lens.go internal/lsp: switch to the new command API 2021-02-09 22:09:28 +00:00
comment.go gopls, internal/lsp: gofmt 2022-04-12 17:41:31 +00:00
comment_test.go internal/lsp/source: refactor commentToMarkdown function 2021-05-19 23:19:09 +00:00
diagnostics.go internal/lsp: remove unused code 2022-03-17 13:53:41 +00:00
extract.go internal/lsp: factor out go/token wrapper into a safetoken package 2022-05-09 17:03:37 +00:00
fix.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
folding_range.go internal/lsp: foldable multiline strings 2022-01-04 20:54:25 +00:00
format.go internal/span: eliminate Converter and FileConverter 2022-05-17 16:08:12 +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 gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
hover.go internal/lsp/bug: add a package for bug reporting 2022-05-16 14:45:30 +00:00
identifier.go internal/lsp/bug: add a package for bug reporting 2022-05-16 14:45:30 +00:00
identifier_test.go internal/lsp/source: simplify Identifier.enclosing 2022-02-17 17:36:57 +00:00
implementation.go internal/lsp: factor out go/token wrapper into a safetoken package 2022-05-09 17:03:37 +00:00
known_packages.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
options.go internal/lsp: add an option to get notified of bug reports 2022-05-18 01:40:46 +00:00
options_test.go gopls: upgrade staticcheck to v0.3.0 2022-04-07 14:59:24 +00:00
references.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
rename.go internal/lsp: use the correct converter for mapped range offsets 2022-06-01 15:32:54 +00:00
rename_check.go gopls, internal/lsp: gofmt 2022-04-12 17:41:31 +00:00
signature_help.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
source_test.go internal/lsp: add missing bug reporting, and panic during marker tests 2022-05-31 14:14:38 +00:00
stub.go gopls, internal/lsp: gofmt 2022-04-12 17:41:31 +00:00
symbols.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
types_format.go gopls, internal/lsp: gofmt 2022-04-12 17:41:31 +00:00
util.go internal/lsp/source: remove workaround for newline terminated files 2022-06-01 15:40:59 +00:00
util_test.go internal/lsp: use the correct converter for mapped range offsets 2022-06-01 15:32:54 +00:00
view.go gopls: remove usage of golang.org/x/xerrors 2022-04-20 15:33:22 +00:00
workspace_symbol.go gopls, internal/lsp: gofmt 2022-04-12 17:41:31 +00:00
workspace_symbol_test.go internal/lsp/source: parse symbol queries when using fastfuzzy 2022-01-19 15:06:07 +00:00