rust-lang / rust-lang/rust-mode

rust-rustfmt-switches from .dir-local.el

Open
#574 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Emacs Lisp
Stars
1.3k
Forks
198
PR merge metrics
No merged PRs in 30d

Description

In rust-mode 1.0.6 setting rust-rustfmt-switches in .dir-locals.el has no effect.
E.g., ("--edition" "2024) gets disregarded. (value that's been set globally gets read on save, in my case it was ("--edition" "2018").

It seems possible to configure rust-fmt per-project by setting nil, in which case it reads config from rustfmt.toml, and that's the default now.
Still, may be nice to allow per-project configuration via .dir-locals.el?

Contributor guide

No contributing guide indexed for this repository

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

Reproduce the issue in rust-mode 1.0.6 with rust-rustfmt-switches set in .dir-locals.el, then trace the formatting path used on save. Compare the project-local value with the globally configured value; done means the per-project setting is honored, or the supported limitation is clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
emacs-lisp, rust
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.