1
0
mirror of https://github.com/golang/go synced 2024-11-18 19:34:41 -07:00
go/internal/lsp/source
Muir Manders 3e93b52866 internal/lsp: suppress more completions in comments and literals
Completion suppression in comments wasn't working for comments in
switch case statements, select case statements, and decl statements.
Rather than adding those to the list of leaf ast.Node types to look
for, we now always check if the position is in a comment. This fix
broke some completion tests that were using re"$" since "$" matches
after the comment "//" characters.

We now also don't complete within any literal values. Previously we
only excluded string literals.

Change-Id: If02f39f79fe2cd7417e39dbac2c6f84a484391ec
GitHub-Last-Rev: 7ab3f526b6752a8f74413dcd268382d359e1beba
GitHub-Pull-Request: golang/tools#88
Reviewed-on: https://go-review.googlesource.com/c/tools/+/173518
Reviewed-by: Rebecca Stambler <rstambler@golang.org>
Run-TryBot: Rebecca Stambler <rstambler@golang.org>
2019-04-24 20:52:08 +00:00
..
analysis.go internal/lsp: add more error propagation and logging for analyses 2019-04-24 02:44:48 +00:00
completion.go internal/lsp: suppress more completions in comments and literals 2019-04-24 20:52:08 +00:00
diagnostics.go internal/lsp: add more error propagation and logging for analyses 2019-04-24 02:44:48 +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: normalise and make public diff<->edit conversions 2019-04-15 20:31:36 +00:00
highlight.go internal/lsp: add support for document highlight 2019-03-26 19:08:20 +00:00
hover.go internal/lsp: support comments on hover for typenames, funcs, fields 2019-04-22 16:38:38 +00:00
identifier.go internal/lsp: add check for nil package 2019-04-22 21:23:51 +00:00
signature_help.go internal/lsp: improve signatureHelp in various cases 2019-04-17 18:10:49 +00:00
symbols.go internal/lsp: make interface methods children of the interface symbol 2019-04-24 02:46:01 +00:00
view.go internal/lsp: use ast.Nodes for hover information 2019-04-18 23:52:43 +00:00