Skip to content

Allow to open an untitled editor with associated resource #117985

@dmklementiev-zz

Description

@dmklementiev-zz

I'd like to propose a feature for adding API to open an untitled editor with an associated file name/pattern. In my scenario I am trying to enable code snippets (via registerCompletionItemProvider(my pattern...)) for an untitled editor that contains json code. When I use openTextDocument({ language: 'json'}), VSCode creates Untitled-x (json) document as expected. However, in this case I cannot think of any file name pattern for my code complete snippets. It's just all .json files or none.

Metadata

Metadata

Assignees

No one assigned

    Labels

    *out-of-scopePosted issue is not in scope of VS Codeapifeature-requestRequest for new features or functionalityworkbench-untitled-editorsManaging of untitled editors in workbench window

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions