Skip to content

Feature Request: API support for autocomplete "preselection" #35551

@rchande

Description

@rchande

The Visual Studio for Windows text editor's completion API has a feature that allows languages that implement completion to set the item that is selected when the completion list first comes up. The C# language service in VS has used this to build various experiences that they call "preselection": namely, the completion list comes up when the user types SPACE and a useful item is already selected. The canonical example of this is preselecting items after new in C#. List<string> is not normally present in the completion list, but gets specifically added preselected after the new keyword when the type of the expected expression is List<string> (or whatever).
image

It would be nice if VS Code could add a similar feature (perhaps by adding a "Preselect" bit to to the CompletionItem class). If this API were available, we would definitely consume it from omnisharp-vscode.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions