Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove restriction of displaying semantic diagnostic in TypeScript files in custom schemes #160124

Closed
zardoy opened this issue Sep 5, 2022 · 2 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s) typescript Typescript support issues

Comments

@zardoy
Copy link
Contributor

zardoy commented Sep 5, 2022

Hi! I'm building an extension, which uses its own scheme instead of untitled to control process of saving. And as I can see, semanitc diagnostics are being filtered out in my editors, however they're working fine just like as any other inferred project such as in Unittled files.

export const semanticSupportedSchemes = [
file,
untitled,
walkThroughSnippet,
vscodeNotebookCell,
];

I'm just curious why even this restriction exists?

My feature request here is to let other extensions contributing system providers use full TS experience by display semantic diagnostics in all schemes.

@mjbvz
Copy link
Collaborator

mjbvz commented Sep 6, 2022

Duplicate of microsoft/TypeScript#47600

This limitations exists because the TypeScript server can't read files that use custom schemes. This means that imports can't be resolved, which causes false errors

@mjbvz mjbvz closed this as completed Sep 6, 2022
@mjbvz mjbvz added typescript Typescript support issues *duplicate Issue identified as a duplicate of another issue(s) labels Sep 6, 2022
@zardoy
Copy link
Contributor Author

zardoy commented Sep 6, 2022

But in my case my extension doesn't mean to support file imports. It's something like playground, I just need diagnostics for current file only, for example:

const a = 5
a = 'test'
// would print nothing, too annoying

@mjbvz this limitation is too strict! I would like to see a way to workaround by configuring builtin TypeScript extension with its API to add support for custom schemes. like api.addScheme()

@github-actions github-actions bot locked and limited conversation to collaborators Oct 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s) typescript Typescript support issues
Projects
None yet
Development

No branches or pull requests

3 participants
@mjbvz @zardoy and others