Expected Behavior:
There is a notification mechanism for a CompletionProvider to be notified when a given CompletionItem that was provided is committed to a document.
Actual Behavior:
Currently there is no way for a CompletionProvider to be notified that a given completion item has been committed to a document. This is important for telemetry purposes and to effect some completions that are provided later on (accepting a completion in one circumstance increases the chances that a user will accept the same or similar completions later). Currently the GetChangeAsync and GetTextChangeAsync functions are close, but are called in more circumstances than just commit of a given completion, and so is not suitable for this purpose.
It would be good to add an abstract function or similar to the CompletionProvider or PythiaCompletionProviderBase which has similar arguments to GetChangeAsync specifically:
(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default)
Expected Behavior:
There is a notification mechanism for a CompletionProvider to be notified when a given CompletionItem that was provided is committed to a document.
Actual Behavior:
Currently there is no way for a CompletionProvider to be notified that a given completion item has been committed to a document. This is important for telemetry purposes and to effect some completions that are provided later on (accepting a completion in one circumstance increases the chances that a user will accept the same or similar completions later). Currently the GetChangeAsync and GetTextChangeAsync functions are close, but are called in more circumstances than just commit of a given completion, and so is not suitable for this purpose.
It would be good to add an abstract function or similar to the CompletionProvider or PythiaCompletionProviderBase which has similar arguments to GetChangeAsync specifically:
(Document document, CompletionItem item, char? commitKey = null, CancellationToken cancellationToken = default)