Commit deb3d2f
authored
Improved syntax highlighting support for Rust (#240)
Improved syntax highlighting support for Rust
The syntax highlighting for Rust [1] has been improved:
1. Use `nord7` as foreground color for entity types.
2. Use `nord8` as foreground color with bold font for macros [2] to
make them visually different from "normal" functions.
3. Use `nord10` for attributes [3] and derives [4].
4. Use `nord13` for interpolation brackets to match the color for
regular expression and special tokens in strings.
5. As a result of list item 1, import statements and paths are correctly
colored with keyword and type colors.
6. Use the correct highlighting for traits [5] by making the font bold.
[1]: https://www.rust-lang.org
[2]: https://doc.rust-lang.org/1.8.0/book/macros.html
[3]: https://doc.rust-lang.org/reference/attributes.html
[4]: https://doc.rust-lang.org/book/ch19-06-macros.html#how-to-write-a-custom-derive-macro
[5]: https://doc.rust-lang.org/book/ch10-02-traits.html
Co-authored-by: Arctic Ice Studio <development@arcticicestudio.com>
Co-authored-by: Sven Greb <development@svengreb.de>
Resolves GH-1671 parent 92e73bd commit deb3d2f
1 file changed
Lines changed: 40 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1215 | 1215 | | |
1216 | 1216 | | |
1217 | 1217 | | |
| 1218 | + | |
| 1219 | + | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
| 1225 | + | |
| 1226 | + | |
| 1227 | + | |
| 1228 | + | |
| 1229 | + | |
| 1230 | + | |
| 1231 | + | |
| 1232 | + | |
| 1233 | + | |
| 1234 | + | |
| 1235 | + | |
| 1236 | + | |
| 1237 | + | |
| 1238 | + | |
| 1239 | + | |
| 1240 | + | |
| 1241 | + | |
| 1242 | + | |
| 1243 | + | |
| 1244 | + | |
| 1245 | + | |
| 1246 | + | |
| 1247 | + | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
1218 | 1258 | | |
1219 | 1259 | | |
1220 | 1260 | | |
| |||
0 commit comments