Skip to content

VS Code Notebooks support #275

@Igorbek

Description

@Igorbek

It seems when a TypeScript-projected language is used in the VS Code Notebook, it doesn't work because URI Converter does not support the URIs of the notebook cells.

VS Code uses vscode-notebook-cell://<original-notebook-file-path>#<cellId> format for the cells. This way different URI fragments represent different cells.

When Volar converts this into filename, it doesn't preserve # fragment anywhere and then recovers it incorrectly.

Proposal

When fragment is present, add '/' + encodeURIComponent('#' + fragment) ('/%23' prefix) to the end of the file path.
To identify the fragment, the path should have last path component starting with %23 and do not contain more /.

It may conflict with filenames starting with %23 (eg, notebook filename %23andme.mynotebook).

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