Remove hard coded edition fallback

Abierto
#531 2 comentarios 1 reacción 0 asignados Ver en GitHub

@alerque ya está trabajando en esto.

Desde el 24/3/2026.

  • #532 de @alerque — abierto

Evaluación

Dificultad
1/5
Tiempo estimado
Menos de una hora
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Estancado
Stack tecnológico
rust
Área
tooling

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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!

Lenguaje dominante
Vim Script
Estrellas
4.2k
Forks
323
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de rust-lang/rust.vim

Todos los issues de rust-lang/rust.vim

Issues similares

Más issues de DevTools

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.