diff options
author | Seivan Heidari <[email protected]> | 2019-11-28 07:19:14 +0000 |
---|---|---|
committer | Seivan Heidari <[email protected]> | 2019-11-28 07:19:14 +0000 |
commit | 18a0937585b836ec5ed054b9ae48e0156ab6d9ef (patch) | |
tree | 9de2c0267ddcc00df717f90034d0843d751a851b /crates/ra_ide/src/snapshots/highlighting.html | |
parent | a7394b44c870f585eacfeb3036a33471aff49ff8 (diff) | |
parent | 484acc8a61d599662ed63a4cbda091d38a982551 (diff) |
Merge branch 'master' of https://github.com/rust-analyzer/rust-analyzer into feature/themes
Diffstat (limited to 'crates/ra_ide/src/snapshots/highlighting.html')
-rw-r--r-- | crates/ra_ide/src/snapshots/highlighting.html | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html new file mode 100644 index 000000000..b39c4d371 --- /dev/null +++ b/crates/ra_ide/src/snapshots/highlighting.html | |||
@@ -0,0 +1,48 @@ | |||
1 | |||
2 | <style> | ||
3 | body { margin: 0; } | ||
4 | pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4em; } | ||
5 | |||
6 | .comment { color: #7F9F7F; } | ||
7 | .string { color: #CC9393; } | ||
8 | .function { color: #93E0E3; } | ||
9 | .parameter { color: #94BFF3; } | ||
10 | .builtin { color: #DD6718; } | ||
11 | .text { color: #DCDCCC; } | ||
12 | .attribute { color: #94BFF3; } | ||
13 | .literal { color: #BFEBBF; } | ||
14 | .macro { color: #94BFF3; } | ||
15 | .variable { color: #DCDCCC; } | ||
16 | .variable\.mut { color: #DCDCCC; text-decoration: underline; } | ||
17 | |||
18 | .keyword { color: #F0DFAF; } | ||
19 | .keyword\.unsafe { color: #DFAF8F; } | ||
20 | .keyword\.control { color: #F0DFAF; font-weight: bold; } | ||
21 | </style> | ||
22 | <pre><code><span class="attribute">#</span><span class="attribute">[</span><span class="attribute">derive</span><span class="attribute">(</span><span class="attribute">Clone</span><span class="attribute">,</span><span class="attribute"> </span><span class="attribute">Debug</span><span class="attribute">)</span><span class="attribute">]</span> | ||
23 | <span class="keyword">struct</span> <span class="type">Foo</span> { | ||
24 | <span class="keyword">pub</span> <span class="field">x</span>: <span class="type">i32</span>, | ||
25 | <span class="keyword">pub</span> <span class="field">y</span>: <span class="type">i32</span>, | ||
26 | } | ||
27 | |||
28 | <span class="keyword">fn</span> <span class="function">foo</span><<span class="type">T</span>>() -> <span class="type">T</span> { | ||
29 | <span class="macro">unimplemented</span><span class="macro">!</span>(); | ||
30 | <span class="function">foo</span>::<<span class="type">i32</span>>(); | ||
31 | } | ||
32 | |||
33 | <span class="comment">// comment</span> | ||
34 | <span class="keyword">fn</span> <span class="function">main</span>() { | ||
35 | <span class="macro">println</span><span class="macro">!</span>(<span class="string">"Hello, {}!"</span>, <span class="literal">92</span>); | ||
36 | |||
37 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut">vec</span> = <span class="text">Vec</span>::<span class="text">new</span>(); | ||
38 | <span class="keyword.control">if</span> <span class="keyword">true</span> { | ||
39 | <span class="variable.mut">vec</span>.<span class="text">push</span>(<span class="type">Foo</span> { <span class="field">x</span>: <span class="literal">0</span>, <span class="field">y</span>: <span class="literal">1</span> }); | ||
40 | } | ||
41 | <span class="keyword.unsafe">unsafe</span> { <span class="variable.mut">vec</span>.<span class="text">set_len</span>(<span class="literal">0</span>); } | ||
42 | |||
43 | <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable.mut">x</span> = <span class="literal">42</span>; | ||
44 | <span class="keyword">let</span> <span class="variable.mut">y</span> = &<span class="keyword">mut</span> <span class="variable.mut">x</span>; | ||
45 | <span class="keyword">let</span> <span class="variable">z</span> = &<span class="variable.mut">y</span>; | ||
46 | |||
47 | <span class="variable.mut">y</span>; | ||
48 | }</code></pre> \ No newline at end of file | ||