Open bzm3r opened 1 year ago
This isn't clear to me. You'd like bacon to not display the errors itself but to send to vscode the raw JSON output of cargo ?
@Canop No, not quite. Let me clarify:
I would like bacon
to display the output it usually does in terminal
I would like bacon
to save/pipe/pass the output of cargo check/clippy to rust-analyzer
so that I can use "jump to error" etc. within VS Code via rust-analyzer
Right now bacon uses stdout for its output, so a solution could be to send to stderr what it receives, assuming vscode accepts it. But there's no such feature in bacon, it would need to be added. Or maybe use a tee as job.
@Canop makes sense! I'll look into seeing if I can make a PR, but I might just stick with my current setup. Regardless, the clarification was super helpful!
@bzm3r I am interested in your current setup, Rust-Analyzer is too slow for our gigantic repo, I would prefer if I can just use RA for code navigation and code hinting while use slow running background checks for errors and lazily see those
@Niraj-Kamdar No, I moved away entirely from bacon
. rust-analyzer
allows me to get my work done :shrug:
I'm interested in using
bacon
withrust-analyzer
.rust-analyzer
allows for compiler feedback from external tools.In VS Code, we must define a build task, I think something like this under the project's
.vscode/tasks.json
:However, the part I am uncertain about is how to set up my
bacon.toml
so that the cargo check/clippy command emits errors out in json to stderr using the flag--error-format=json
.If I set up a command like this:
Then I get a build error stating that I provided the error-format argument twice.
Is this due to a clash with the
-e
option ofbacon
? I have disabled this inprefs.toml
both by tryingenabled = false
and simply commenting out the entire block, with no success.Any ideas on what I can try next? Is there a way for me to pass the default
.bacon-locations
(perhaps I have to rename the output file) to rust-analyzer? Not entirely sure, so all ideas would be appreciated!