Skip to content

Typescript language server errors for virtual files from SCM providers (e.g. hg extension) #106299

@DavidGoldman

Description

@DavidGoldman
  • VSCode Version: 1.48.2
  • OS Version: macOS 10.15.5

The TS LSP has a special deny list for specific schemes but it does not contain schemes for custom SCM providers, such as the hg extension or private extensions.

  1. If the SCM provider does use their own scheme and keeps the file extension (e.g. .ts), the user will see errors reported in those virtual files but receive regex based syntax highlighting in the two-pane diff view.
  2. If the SCM provider does use their own scheme and removes the file extension (e.g. adds .hg), all LSP and syntax highlighting functionality will disappear for the SCM files (no regex based syntax highlighting).

Steps to Reproduce:

  1. Create an hg repository (e.g. yo code and hg init)
  2. Create and open a TS file in the repository which imports other files, observe errors

Possible Solutions:

  • Denote in LSP that these files are specific to SCM or virtual files. Even better, don't send them to the LSPs, they're an implementation detail from SCM providers. LSPs cannot scale to support all possible virtual file schemes.
  • Add an API/user setting to customize these lists globally (possibly for all LSPs)

Does this issue occur when all extensions are disabled?: No

Metadata

Metadata

Assignees

Labels

insiders-releasedPatch has been released in VS Code InsidersjavascriptJavaScript support issuestypescriptTypescript support issues

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions