-
Notifications
You must be signed in to change notification settings - Fork 13.4k
CompletionEntry.insertText #20730
Copy link
Copy link
Closed
Labels
Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
Milestone
Metadata
Metadata
Assignees
Labels
Domain: APIRelates to the public API for TypeScriptRelates to the public API for TypeScriptFixedA PR has been merged for this issueA PR has been merged for this issueSuggestionAn idea for TypeScriptAn idea for TypeScriptVS Code TrackedThere is a VS Code equivalent to this issueThere is a VS Code equivalent to this issue
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
insertTextproperty on forCompletionEntryProposal
Add a new
insertTextproperty onCompletionEntry:When used alongside the
replacementSpanproperty, this would allow us to implement #19433To keep this change non-breaking, I propose we add a new flag to
CompletionsRequestArgsto enable these symbols being returned:Completions that require
insertTextwould only be returned ifincludeInsertTextCompletionsis set to true.includeInsertTextCompletionsseems like a poor name. We could be more specific to #19433 and call itincludeBracetCompletions