CompletionEntry.insertText #20730
Labels
API
Relates to the public API for TypeScript
Fixed
A PR has been merged for this issue
Suggestion
An idea for TypeScript
VS Code Tracked
There is a VS Code equivalent to this issue
Milestone
Problem
#19433 requests the ability to have completion items for symbols that require bracket access, such as
obj['space prop']
. This is currently implemented using additionalTextEdits, which have their own complications on the VS Code side (see microsoft/vscode#39893).As a simplified approach that better matches the VS Code API, we would instead like to introduce an
insertText
property on forCompletionEntry
Proposal
Add a new
insertText
property onCompletionEntry
:When used alongside the
replacementSpan
property, this would allow us to implement #19433To keep this change non-breaking, I propose we add a new flag to
CompletionsRequestArgs
to enable these symbols being returned:Completions that require
insertText
would only be returned ifincludeInsertTextCompletions
is set to true.includeInsertTextCompletions
seems like a poor name. We could be more specific to #19433 and call itincludeBracetCompletions
The text was updated successfully, but these errors were encountered: