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

Check on debounce #11154

Closed
Milo123459 opened this issue Jan 1, 2022 · 3 comments
Closed

Check on debounce #11154

Milo123459 opened this issue Jan 1, 2022 · 3 comments

Comments

@Milo123459
Copy link
Contributor

Perhaps, if you stop typing for a period of time, it automatically runs the check command? The TS extension does this, but it does it because of how fast it can be in doing this. If it is managed to be heavily optimised, it could even run when typing.

Possibly related (on the speed side): #10149

@bjorn3
Copy link
Member

bjorn3 commented Jan 1, 2022

The cargo check command can only run after you save (manually or autosave) due to rustc only being able to read files from the disk and not from the rust-analyzer vfs. See #3107.

@lnicola
Copy link
Member

lnicola commented Jan 1, 2022

Check runs on save, and you can configure Code to save automatically after a delay. We can't show the cargo check diagnostics without saving the files (because cargo reads them from disk) and we shouldn't save files automatically neither in Code nor in other editors (because it's the editor's job to write the files to disk).

The cache priming is unrelated, it's just precomputing information about the symbols and exports in the project.

@Milo123459
Copy link
Contributor Author

Ah, alright. I guess to get something like this more static analysing would need to be done. Thanks.

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

3 participants