1

I am running into an unexpected issue when it comes to toolchains in CLion. I want to use the stable channel for the compiler while using the nightly for rustfmt. The reason is that I want to use rustfmt features that are not available in the stable version. Unfortunately CLion only picks up the currently selected toolchain without any way to override or customize this and thus has not option to select the nightly of rustfmt for formatting. Is there any workaround or option I did not notice when looking for it?

In the comment there was the suggestion that cargo +nightly fmt might be what I am looking for. Even though it allows to used the nightly of rustfmt it is not integrated into the flow of CLion which seems to use the currently enabled version of the entire toolchain.

Christian Ivicevic
  • 9,293
  • 7
  • 35
  • 67
  • Does this answer your question? [How to execute cargo test using the nightly channel?](https://stackoverflow.com/questions/48593858/how-to-execute-cargo-test-using-the-nightly-channel) – Inline May 05 '21 at 08:46
  • Not necessarily since this would be invoking the formatter manually via the command line. Of cource a `cargo +nightly fmt` would work, it's not integrated into the flow of CLions auto-formatting when saving a file. – Christian Ivicevic May 05 '21 at 09:32
  • Did you try to configure the formatter as external tools? – Angelo May 05 '21 at 09:44

0 Answers0