How to use configuration found in `.rustfmt.toml` when running Rust format?
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 35/100
- Issue-Typ
- Dokumentation
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Veraltet
- Tech-Stack
- vim
- Bereich
- developer-experience
Rechercherichtung
Read the rust.vim configuration and formatting documentation to determine how rustfmt options are passed and whether .rustfmt.toml is discovered from a parent directory. The issue gives no file or test entry point, so first locate the documentation or code that handles rustfmt_options. Done means documenting a working setup that applies the stated imports_layout configuration.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
- rust.vim version: Whatever comes automatically by including
"rust-lang/rust.vim"in myplugins.luafile - nvchad distro of Neovim.
Steps to reproduce:
In my plugin directory I currently have:
{
"rust-lang/rust.vim",
ft = "rust",
init = function ()
vim.rustfmt_options = "+nightly"
vim.g.rustfmt_autosave = 1
end
},
This is working inasmuch as it's reformatting my code on save.
However, it's ignoring the configurations I have set in the .rustfmt.toml in the parent directory.
For example:
imports_layout = "Vertical"
should result in the imports being stacked, but the formatting from rust.vim is undoing that.
Expected vs. actual behavior:
This isn't a bug as much as a gap in my knowledge. I'd hope to find a solution that recognizes my .rustfmt.toml and includes the configuration. Perhaps I could include a lua script that checks if it exists and includes it in the rustfmt_options?
- Vorherrschende Sprache
- Vim Script
- Sterne
- 4.2k
- Forks
- 323
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus rust-lang/rust.vim
-
Schwierigkeit 1/5 1-3 Stunden Anfängerfreundlichkeit 76/100
-
It's Dead, Jim!Offen
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
-
Remove hard coded edition fallbackEvtl. vergeben @alerque hat das vor 231 Tagen übernommen. Offen
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 35/100
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 55/100
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
Alle Issues in rust-lang/rust.vim
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
Maintainer antworten meist innerhalb von 1 Tag
-
dependencies
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 63/100
n0mad-ai/bastra-recall#1434 ·
Maintainer antworten meist innerhalb von 1 Tag
-
good first issue help wanted python up-for-grabs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
andrewsiah/agentswarm-data-tasks#121 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Prettier and ESLint pre-commit hooks can't find their executablesEvtl. vergeben @jamescrosswell hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 77/100
getsentry/sentry-docs#20705 ·
Maintainer antworten meist innerhalb von 1 Tag
-
chore
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
alunduil/alunduil-chezmoi#1170 ·
Maintainer antworten meist innerhalb von 1 Tag