rust-lang / rust-lang/rust-analyzer

rust-analyzer.rustfmt.overrideCommand value format isn't documented

Open
#13,172 9 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-documentation C-enhancement
Dominant language
Rust
Stars
16.9k
Forks
2.2k
Avg merge
1d 12h
Merged PRs (30d)
72

Description

The current documentation on this setting is not very clear:

Advanced option, fully override the command rust-analyzer uses for formatting.

From #10826 I gathered that I should be able to set it to an array containing an absolute path to a rustfmt executable, but this just caused rust-analyzer to not format files at all anymore (I set it to my nightly toolchain's rustfmt binary).

Could it be documented how this option is meant to be used? Alternatively, it would be great if I could just tell rust-analyzer to use rustfmt from a different toolchain than what's used for everything else.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Review the documentation for rust-analyzer.rustfmt.overrideCommand and the behavior discussed in #10826. Document the accepted value format and how to use a rustfmt executable from another toolchain, or clearly explain the supported limitation. Done means users can configure the setting without ambiguity.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.