"if" in comment can mess up indentaction
还没有人认领这个 Issue。
评估
调研方向
Start with the referenced logic in indent/rust.vim at lines 148–149 and check how it handles the example comment before a struct block. Reproduce the indentation issue with the supplied steps, then confirm that the closing brace is no longer indented by the comment. No test file is mentioned in the issue.
由索引模型根据 Issue 内容生成。
描述
- rust.vim version: 4aa69b84c8a58fcec6b6dad6fe244b916b1cf830
Steps to reproduce:
- Edit a file with "If" inside a comment, on an indented line (I believe "fn" will also trigger the issue)
- Begin and end any block
Expected behavior: The comment shouldn't affect indenting
Actual behavior: The } char will be indented to match the indent of the comment line. Note the leading space in the example below:
/**
* Something is wrong if rust.vim adds indent to the last line
*/
struct Foo {
}
I believe this is due to this line, which doesn't take into account if a line is a comment or not: https://github.com/rust-lang/rust.vim/blob/master/indent/rust.vim#L148-L149
- 主要语言
- 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 小时 新手友好度 85/100
维护者通常 1 天内回复
-
bug documentation
难度 2/5 1-3 小时 新手友好度 83/100
cqframework/vscode-cql#198 ·
-
bug documentation good first issue help wanted testing
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
Show evidence time and supersede warnings in the memory inspector可能已有人在做 @Sinchanak-212 今天认领。 未关闭area: ux good first issue priority: medium
难度 2/5 1-3 小时 新手友好度 84/100
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
rohit746/pdf-view.nvim#109 ·
维护者通常 1 天内回复