Skip to content

lsp: support untitled scheme #11675

Open
@Sysix

Description

@Sysix

VSCode can create files without saving them.
After autodetecting the language, VSCode could send textDocument requests to the server.

The newly created files are stored in memory until saved.

Work to be done:

  • change LintService/Runtime to handle content without a path
    • this is needed because of import from @utils/xyz, vitest, or platform packages: node:path in combination with the import plugin
    • or make a fake path for it?
  • Change ServerLinter/IsolatedLinter to accept a path or content
  • Detect somehow the language for the untitled file
    • textDocument/didOpen has the only parameter where languageId is passed
    • maybe there is another option
  • Split logic when schema is file or schema is untitled

For VSCode:

  • add schema untitled to documentSelector in VSCode

Metadata

Metadata

Assignees

Labels

A-editorArea - Editor and Language Server

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions