rwols marked an inline comment as done.
rwols added a comment.

Thinking ahead, it's probably best if we change the behavior of 
`SnippetCompletionItemCollector` as follows:

1. If it finds a callable, provide the name of the callable, followed by an 
opening parenthesis, followed by `$0`, followed by a closing parenthesis.
2. If it finds a code pattern, use the old behavior.

The point of (1) is that it should trigger textDocument/signatureHelp in the 
client immediately upon insertion of the completion. For example, if we have 
this function:

  int foo(int x, int y);

Then the `insertText` would be `foo($0)`. This causes the cursor to end up 
in-between the parentheses. Then it'll trigger textDocument/signatureHelp and 
that'll provide the parameter info.

The point of (2) is that we don't want to apply (1) for things like for-loop 
completions, or if-else constructs.


https://reviews.llvm.org/D38048



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to