as should be a rustKeyword not rustOperator for syntax highlighting
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 76/100
- Issue 类型
- 缺陷
- 描述清晰度
- 描述清楚
- 活跃度
- 停滞
- 技术栈
- vim
- 领域
- tooling
调研方向
从 runtime/syntax/rust.vim 开始,issue 指出其中将 as 分类为 rustOperator。将它的高亮与示例中的其他 Rust 关键字进行比较,并确定语法组定义的位置。完成标准是:在引用的表达式中,as 的高亮方式与 use 和 let 相同,而不是与 = 或 + 相同。
由索引模型根据 Issue 内容生成。
描述
The as keyword is currently a rustOperator according to runtime/syntax/rust.vim, which is kind of surprising because in these kinds of expressions:
use foo as bar;
let thing1: u8 = 7 + 8 as u8;
use std::{mem as memory, net as network};
I expect as to always have the same highlighting as use and let, but not as = or +.
In fact in all rust documentation, it is highlighted as if it were a keyword, not an operator, and in every syntax highlighter online (e.g. right here, and in stackoverflow) it is also highlighted as if it were a keyword and not an operator.
As it stands, gruvbox (a universally loved colorscheme, the most popular Vim and neovim colorscheme) actually makes it look like the syntax file doesn't even support the language feature as.
I think that's very ugly, and confusing. The disparity between everything you read in documentation and your local editor makes you question "is my runtime broken? up-to-date?"
- 主要语言
- Vim Script
- 星标
- 4.2k
- 派生
- 323
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
rust-lang/rust.vim 的其他 Issue
-
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
-
难度 3/5 1-2 天 新手友好度 43/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 天内回复