-
Notifications
You must be signed in to change notification settings - Fork 925
stdin formatting fails if mod file not found #562
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
Comments
Yeah, this is a problem when fmting files over Emacs TRAMP, for example. |
Is there a temporary solution to this? For instance, in VS Code can we pass an argument to RLS that will tell it to look in the source directory for the modules? |
Also, in VS Code, it automatically switches to the output panel from the problems panel whenever it outputs this error. So every time I save the file, I have to switch panels. Is there a workaround to this as well? |
Hmm, I'm not really sure how to fix this. Even if we get the info from VSCode or emacs or whatever, the hard part is how to communicate that to the parser (and actually if we are getting in to changing the parser, then just stopping at |
I have a PR to libsyntax that should fix this, at least on the libsyntax branch - rust-lang/rust#42071 |
This is fixed on the libsyntax branch now |
result:
For file formatting it's quite okay since you have a location to search modules in, but obviously this behavior is not ideal when piping from stdin.
The error is generated by syntex_syntax. Maybe we can parse syntax items more granularly and ignore this kind of error.
The text was updated successfully, but these errors were encountered: