aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_ide/src/snapshots
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_ide/src/snapshots')
-rw-r--r--crates/ra_ide/src/snapshots/highlight_injection.html39
-rw-r--r--crates/ra_ide/src/snapshots/highlighting.html10
2 files changed, 44 insertions, 5 deletions
diff --git a/crates/ra_ide/src/snapshots/highlight_injection.html b/crates/ra_ide/src/snapshots/highlight_injection.html
new file mode 100644
index 000000000..6ec13bd80
--- /dev/null
+++ b/crates/ra_ide/src/snapshots/highlight_injection.html
@@ -0,0 +1,39 @@
1
2<style>
3body { margin: 0; }
4pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padding: 0.4em; }
5
6.lifetime { color: #DFAF8F; font-style: italic; }
7.comment { color: #7F9F7F; }
8.struct, .enum { color: #7CB8BB; }
9.enum_variant { color: #BDE0F3; }
10.string_literal { color: #CC9393; }
11.field { color: #94BFF3; }
12.function { color: #93E0E3; }
13.parameter { color: #94BFF3; }
14.text { color: #DCDCCC; }
15.type { color: #7CB8BB; }
16.builtin_type { color: #8CD0D3; }
17.type_param { color: #DFAF8F; }
18.attribute { color: #94BFF3; }
19.numeric_literal { color: #BFEBBF; }
20.macro { color: #94BFF3; }
21.module { color: #AFD8AF; }
22.variable { color: #DCDCCC; }
23.mutable { text-decoration: underline; }
24
25.keyword { color: #F0DFAF; font-weight: bold; }
26.keyword.unsafe { color: #BC8383; font-weight: bold; }
27.control { font-style: italic; }
28</style>
29<pre><code><span class="keyword">fn</span> <span class="function declaration">fixture</span>(<span class="variable declaration">ra_fixture</span>: &<span class="builtin_type">str</span>) {}
30
31<span class="keyword">fn</span> <span class="function declaration">main</span>() {
32 <span class="function">fixture</span>(<span class="string_literal">r#"</span>
33 <span class="keyword">trait</span> <span class="trait declaration">Foo</span> {
34 <span class="keyword">fn</span> <span class="function declaration">foo</span>() {
35 <span class="macro">println!</span>(<span class="string_literal">"2 + 2 = {}"</span>, <span class="numeric_literal">4</span>);
36 }
37 }<span class="string_literal">"#</span>
38 );
39}</code></pre> \ No newline at end of file
diff --git a/crates/ra_ide/src/snapshots/highlighting.html b/crates/ra_ide/src/snapshots/highlighting.html
index 495b07f69..214dcbb62 100644
--- a/crates/ra_ide/src/snapshots/highlighting.html
+++ b/crates/ra_ide/src/snapshots/highlighting.html
@@ -26,7 +26,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
26.keyword.unsafe { color: #BC8383; font-weight: bold; } 26.keyword.unsafe { color: #BC8383; font-weight: bold; }
27.control { font-style: italic; } 27.control { font-style: italic; }
28</style> 28</style>
29<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> 29<pre><code><span class="attribute">#[derive(Clone, Debug)]</span>
30<span class="keyword">struct</span> <span class="struct declaration">Foo</span> { 30<span class="keyword">struct</span> <span class="struct declaration">Foo</span> {
31 <span class="keyword">pub</span> <span class="field declaration">x</span>: <span class="builtin_type">i32</span>, 31 <span class="keyword">pub</span> <span class="field declaration">x</span>: <span class="builtin_type">i32</span>,
32 <span class="keyword">pub</span> <span class="field declaration">y</span>: <span class="builtin_type">i32</span>, 32 <span class="keyword">pub</span> <span class="field declaration">y</span>: <span class="builtin_type">i32</span>,
@@ -36,11 +36,11 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
36 <span class="function">foo</span>::&lt;<span class="lifetime">'a</span>, <span class="builtin_type">i32</span>&gt;() 36 <span class="function">foo</span>::&lt;<span class="lifetime">'a</span>, <span class="builtin_type">i32</span>&gt;()
37} 37}
38 38
39<span class="macro">macro_rules</span><span class="macro">!</span> def_fn { 39<span class="macro">macro_rules!</span> def_fn {
40 ($($tt:tt)*) =&gt; {$($tt)*} 40 ($($tt:tt)*) =&gt; {$($tt)*}
41} 41}
42 42
43<span class="macro">def_fn</span><span class="macro">!</span> { 43<span class="macro">def_fn!</span> {
44 <span class="keyword">fn</span> <span class="function declaration">bar</span>() -&gt; <span class="builtin_type">u32</span> { 44 <span class="keyword">fn</span> <span class="function declaration">bar</span>() -&gt; <span class="builtin_type">u32</span> {
45 <span class="numeric_literal">100</span> 45 <span class="numeric_literal">100</span>
46 } 46 }
@@ -48,7 +48,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
48 48
49<span class="comment">// comment</span> 49<span class="comment">// comment</span>
50<span class="keyword">fn</span> <span class="function declaration">main</span>() { 50<span class="keyword">fn</span> <span class="function declaration">main</span>() {
51 <span class="macro">println</span><span class="macro">!</span>(<span class="string_literal">"Hello, {}!"</span>, <span class="numeric_literal">92</span>); 51 <span class="macro">println!</span>(<span class="string_literal">"Hello, {}!"</span>, <span class="numeric_literal">92</span>);
52 52
53 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable declaration mutable">vec</span> = Vec::new(); 53 <span class="keyword">let</span> <span class="keyword">mut</span> <span class="variable declaration mutable">vec</span> = Vec::new();
54 <span class="keyword control">if</span> <span class="keyword">true</span> { 54 <span class="keyword control">if</span> <span class="keyword">true</span> {
@@ -73,7 +73,7 @@ pre { color: #DCDCCC; background: #3F3F3F; font-size: 22px; padd
73<span class="keyword">impl</span>&lt;<span class="type_param declaration">T</span>&gt; <span class="enum">Option</span>&lt;<span class="type_param">T</span>&gt; { 73<span class="keyword">impl</span>&lt;<span class="type_param declaration">T</span>&gt; <span class="enum">Option</span>&lt;<span class="type_param">T</span>&gt; {
74 <span class="keyword">fn</span> <span class="function declaration">and</span>&lt;<span class="type_param declaration">U</span>&gt;(<span class="keyword">self</span>, <span class="variable declaration">other</span>: <span class="enum">Option</span>&lt;<span class="type_param">U</span>&gt;) -&gt; <span class="enum">Option</span>&lt;(<span class="type_param">T</span>, <span class="type_param">U</span>)&gt; { 74 <span class="keyword">fn</span> <span class="function declaration">and</span>&lt;<span class="type_param declaration">U</span>&gt;(<span class="keyword">self</span>, <span class="variable declaration">other</span>: <span class="enum">Option</span>&lt;<span class="type_param">U</span>&gt;) -&gt; <span class="enum">Option</span>&lt;(<span class="type_param">T</span>, <span class="type_param">U</span>)&gt; {
75 <span class="keyword control">match</span> <span class="variable">other</span> { 75 <span class="keyword control">match</span> <span class="variable">other</span> {
76 <span class="enum_variant">None</span> =&gt; <span class="macro">unimplemented</span><span class="macro">!</span>(), 76 <span class="enum_variant">None</span> =&gt; <span class="macro">unimplemented!</span>(),
77 <span class="variable declaration">Nope</span> =&gt; <span class="variable">Nope</span>, 77 <span class="variable declaration">Nope</span> =&gt; <span class="variable">Nope</span>,
78 } 78 }
79 } 79 }