Remove hard coded edition fallback

未关闭
#531 2 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

@alerque 已经在做这个了。

开始于 2026年3月24日。

  • #532 来自 @alerque —— 未关闭

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
35/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
停滞
技术栈
rust
领域
tooling

调研方向

Start with the hard coded fallback at autoload/rustfmt.vim#L75, linked in the issue, and check how it interacts with rustfmt_command and rustfmt's own fallback. The issue proposes removing the hard coded argument; done means users can supply their preferred fallback or cargo fmt -- without rustfmt receiving the edition argument twice. An open pull request (#532) is already linked.

由索引模型根据 Issue 内容生成。

描述

This hard coded edition is becoming a problem:

https://github.com/rust-lang/rust.vim/blob/889b9a7515db477f4cb6808bef1769e53493c578/autoload/rustfmt.vim#L75

There are multiple issues related to this open already but for very specific symptoms. I think the best early move would be to just remove the hard coded fallback entirely. The rustfmt program itself has it's own fallback mechanism, and people can use the options to pass a default if they want.

The issue now is that rustfmt refuses to accept the argument being specified twice and any attempt to use the currently available settings to use the users preferred fallback results in an error.

The idea of also parsing Cargo.toml has been floated in comments on other issues, but I would suggest it would be better to let users specify their rustfmt_command as cargo fmt -- instead which would accomplish that. Again this solution is currently blocked because it gets overridden by hard coded argument!

主要语言
Vim Script
星标
4.2k
派生
323
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

rust-lang/rust.vim 的其他 Issue

查看 rust-lang/rust.vim 的全部 Issue

相似的 Issue

更多 DevTools Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。