Remove hard coded edition fallback

Đang mở
#531 2 bình luận 1 reaction 0 người được giao Xem trên GitHub

@alerque đang làm issue này rồi.

Từ ngày 24/3/2026.

  • #532 của @alerque — đang mở

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
rust
Lĩnh vực
tooling

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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!

Ngôn ngữ chính
Vim Script
Star
4.2k
Fork
323
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của rust-lang/rust.vim

Tất cả issue của rust-lang/rust.vim

Issue tương tự

Thêm issue về DevTools

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.