go/internal/lsp/testdata/snippets
Muir Manders 716a04c652 lsp/completion: fix postfix completions preceding assignments
In cases like:

  foo.<>
  bar = 123

We weren't detecting that the selector preceding <> was a statement.
The above is parsed as "foo.<>bar = 123", so it looks like <> is
contained in an AssignStmt. This matters because we give different
postfix completions depending on whether it is valid to replace the
surrounding selector with a statement or not.

Updates golang/go#45718.

Change-Id: I8f74505b2c8c7060f1e94433904ff0a987d0cc57
Reviewed-on: https://go-review.googlesource.com/c/tools/+/313269
Run-TryBot: Muir Manders <muir@mnd.rs>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Trust: Rebecca Stambler <rstambler@golang.org>
2021-04-26 15:26:58 +00:00
..
literal.go internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
literal.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
literal_snippets.go.in internal/lsp/source: fix default param name generation 2020-12-07 19:19:02 +00:00
postfix.go lsp/completion: fix postfix completions preceding assignments 2021-04-26 15:26:58 +00:00
snippets.go.golden internal/lsp: remove multi-module support in tests 2020-09-22 16:28:30 +00:00
snippets.go.in internal/lsp/completion: fix invalid struct literal field snippet 2021-02-05 19:39:40 +00:00