1
0
mirror of https://github.com/golang/go synced 2024-10-01 11:18:32 -06:00
go/internal/lsp/source
Muir Manders eda2c2f1ae internal/lsp: fix completion insertion with non-identifier suffix
Completions like "foo.Bar(baz.<>)" were replacing one too many
characters resulting in "foo.Bar(baz.Qux()". This is because the go
parser adds a phantom "_" identifier when parsing "foo.". We thought
the "_" was really there, so we were issuing text edits to replace
it. Fix by ignoring "_" selectors when the cursor is positioned to
their left.

Fixes microsoft/vscode-go#2525

Change-Id: I1233a9d6275e2a79b666ca0230862238160b4aab
GitHub-Last-Rev: de9a3f00187b1b9bfcc4e497461f4602ae6f8923
GitHub-Pull-Request: golang/tools#104
Reviewed-on: https://go-review.googlesource.com/c/tools/+/178217
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
2019-05-20 21:53:15 +00:00
..
analysis.go internal/lsp: add more error propagation and logging for analyses 2019-04-24 02:44:48 +00:00
completion_format.go internal/lsp: fix completion insertion 2019-05-17 18:32:58 +00:00
completion_snippet.go internal/lsp: handle additional snippet cases 2019-05-15 17:48:15 +00:00
completion.go internal/lsp: fix completion insertion with non-identifier suffix 2019-05-20 21:53:15 +00:00
diagnostics_test.go internal/lsp: fix swallowed package errors 2019-05-17 18:33:31 +00:00
diagnostics.go internal/lsp: update column mapper with content on incremental changes 2019-05-20 19:04:59 +00:00
enums.go internal/lsp: switch completion item tests to using the enum strings 2019-04-17 17:57:43 +00:00
format.go internal/lsp: add nil checks for ASTs and token 2019-05-20 20:09:54 +00:00
highlight.go internal/lsp: add nil checks for ASTs and token 2019-05-20 20:09:54 +00:00
hover.go internal/lsp: support definitions and hover for builtins 2019-05-17 00:35:10 +00:00
identifier.go internal/lsp: add nil checks for ASTs and token 2019-05-20 20:09:54 +00:00
signature_help.go internal/lsp: add nil checks for ASTs and token 2019-05-20 20:09:54 +00:00
source_test.go internal/lsp: fix completion insertion 2019-05-17 18:32:58 +00:00
symbols.go internal/lsp: add nil checks for ASTs and token 2019-05-20 20:09:54 +00:00
util.go internal/lsp: support definitions and hover for builtins 2019-05-17 00:35:10 +00:00
view.go internal/lsp: support definitions and hover for builtins 2019-05-17 00:35:10 +00:00