How to use configuration found in `.rustfmt.toml` when running Rust format?
还没有人认领这个 Issue。
评估
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 35/100
- Issue 类型
- 文档
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- vim
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
- 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?
- 主要语言
- Vim Script
- 星标
- 4.2k
- 派生
- 323
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-lang/rust.vim 的其他 Issue
-
难度 1/5 1-3 小时 新手友好度 76/100
-
It's Dead, Jim!未关闭
难度 5/5 一周以上 新手友好度 15/100
-
Remove hard coded edition fallback可能已有人在做 @alerque 于 230 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 35/100
-
难度 1/5 1 小时以内 新手友好度 55/100
-
难度 3/5 1-2 天 新手友好度 45/100
查看 rust-lang/rust.vim 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
mglaman/phpstan-drupal#1078 ·
维护者通常 1 天内回复
-
[Bug]: Python mod.Box[T] annotation gets a false generic_arg edge that replaces the parameter_type one ('is' on tree-sitter nodes)可能已有人在做 @rohit-jsfreaky 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
Graphify-Labs/graphify#5110 · 1 条评论 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
documentation good first issue
难度 2/5 1-3 小时 新手友好度 76/100
voyageurworks/launch-guard-pack#29 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 67/100
bigbio/sdrf-pipelines#372 · 1 条评论 ·
维护者通常 1 天内回复