Skip to content

Add 'preselect' field to the CompletionItem #371

@MikhailArkhipov

Description

@MikhailArkhipov

VS Code 1.25 adds new preselect field to the CompletionItem. The field allows completion providers to specify which item should be initially selected in the completion list.

By default clients usually select first or last used items, which is limiting. A completion provider may choose to select different item based on other conditions, such as current code editor context, probability of use of certain items, and so on.

This request is to add equivalent field to the CompletionItem structure therefore allowing use of preselection in VS Code from language servers as it is possible from the regular completion provider.

https://github.com/Microsoft/vscode/blob/9ba606df0ee5c2a386eac532771ac343a62f1985/src/vs/workbench/api/node/extHostTypes.ts

Per
microsoft/vscode#35551
microsoft/vscode@62e0f34

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions