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

How to disable type checking for a file and leave only syntax highlighting? #1068

Open
seniorkonung opened this issue Jan 8, 2025 · 2 comments

Comments

@seniorkonung
Copy link

Before I start developing the package, I want to create a test file and sketch out a basic script for interacting with the package. Using functions, modules and types that don't exist, because I make them up as I go along. And I can't figure out how to do it without getting tons of type errors but leaving syntax highlighting.

@seniorkonung
Copy link
Author

seniorkonung commented Jan 8, 2025

I created in settings.json a setting {“files.associations”: {“*.ress”: “rescript"}}.

This works, but every time I save I get the No .res or .resi file. Unable to format it. Is there any way to remove it?

Ideally, I would like to be able to write something like //@noCheck at the top of the file so that the file is ignored by the vscode extension.

@fhammerschmidt
Copy link
Member

fhammerschmidt commented Jan 8, 2025

So at least for the whole project, you can disable incremental compilation in .vscode/settings.json:

{
...
+ "rescript.settings.incrementalTypechecking.enable": false
}

Then it will only be compiled on save, but you would still see parse errors.

Also, it does not solve all your problems, but do you know %todo? Edit: you do.

@zth we already have an editor-specific annotation so can we add a
@@editor.incrementalTypechecking(false) (or similar) as well?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants