Skip to content

Commit b0ff1ff

Browse files
committed
Collect sections in calls too
1 parent 40e9c0f commit b0ff1ff

File tree

3 files changed

+604
-24
lines changed

3 files changed

+604
-24
lines changed
Lines changed: 248 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,248 @@
1+
---
2+
source: crates/ark/src/lsp/symbols.rs
3+
expression: "test_symbol(\"\n# level 1 ----\n\nlist({\n ## foo ----\n 1\n 2 ## bar ----\n 3\n 4\n ## baz ----\n})\n\n## level 2 ----\n\nlist({\n # foo ----\n 1\n 2 # bar ----\n 3\n 4\n # baz ----\n})\n\")"
4+
---
5+
[
6+
DocumentSymbol {
7+
name: "level 1",
8+
detail: None,
9+
kind: String,
10+
tags: None,
11+
deprecated: None,
12+
range: Range {
13+
start: Position {
14+
line: 1,
15+
character: 0,
16+
},
17+
end: Position {
18+
line: 21,
19+
character: 2,
20+
},
21+
},
22+
selection_range: Range {
23+
start: Position {
24+
line: 1,
25+
character: 0,
26+
},
27+
end: Position {
28+
line: 21,
29+
character: 2,
30+
},
31+
},
32+
children: Some(
33+
[
34+
DocumentSymbol {
35+
name: "foo",
36+
detail: None,
37+
kind: String,
38+
tags: None,
39+
deprecated: None,
40+
range: Range {
41+
start: Position {
42+
line: 4,
43+
character: 2,
44+
},
45+
end: Position {
46+
line: 5,
47+
character: 3,
48+
},
49+
},
50+
selection_range: Range {
51+
start: Position {
52+
line: 4,
53+
character: 2,
54+
},
55+
end: Position {
56+
line: 5,
57+
character: 3,
58+
},
59+
},
60+
children: Some(
61+
[],
62+
),
63+
},
64+
DocumentSymbol {
65+
name: "bar",
66+
detail: None,
67+
kind: String,
68+
tags: None,
69+
deprecated: None,
70+
range: Range {
71+
start: Position {
72+
line: 6,
73+
character: 4,
74+
},
75+
end: Position {
76+
line: 8,
77+
character: 3,
78+
},
79+
},
80+
selection_range: Range {
81+
start: Position {
82+
line: 6,
83+
character: 4,
84+
},
85+
end: Position {
86+
line: 8,
87+
character: 3,
88+
},
89+
},
90+
children: Some(
91+
[],
92+
),
93+
},
94+
DocumentSymbol {
95+
name: "baz",
96+
detail: None,
97+
kind: String,
98+
tags: None,
99+
deprecated: None,
100+
range: Range {
101+
start: Position {
102+
line: 9,
103+
character: 2,
104+
},
105+
end: Position {
106+
line: 9,
107+
character: 13,
108+
},
109+
},
110+
selection_range: Range {
111+
start: Position {
112+
line: 9,
113+
character: 2,
114+
},
115+
end: Position {
116+
line: 9,
117+
character: 13,
118+
},
119+
},
120+
children: Some(
121+
[],
122+
),
123+
},
124+
DocumentSymbol {
125+
name: "level 2",
126+
detail: None,
127+
kind: String,
128+
tags: None,
129+
deprecated: None,
130+
range: Range {
131+
start: Position {
132+
line: 12,
133+
character: 0,
134+
},
135+
end: Position {
136+
line: 21,
137+
character: 2,
138+
},
139+
},
140+
selection_range: Range {
141+
start: Position {
142+
line: 12,
143+
character: 0,
144+
},
145+
end: Position {
146+
line: 21,
147+
character: 2,
148+
},
149+
},
150+
children: Some(
151+
[
152+
DocumentSymbol {
153+
name: "foo",
154+
detail: None,
155+
kind: String,
156+
tags: None,
157+
deprecated: None,
158+
range: Range {
159+
start: Position {
160+
line: 15,
161+
character: 2,
162+
},
163+
end: Position {
164+
line: 16,
165+
character: 3,
166+
},
167+
},
168+
selection_range: Range {
169+
start: Position {
170+
line: 15,
171+
character: 2,
172+
},
173+
end: Position {
174+
line: 16,
175+
character: 3,
176+
},
177+
},
178+
children: Some(
179+
[],
180+
),
181+
},
182+
DocumentSymbol {
183+
name: "bar",
184+
detail: None,
185+
kind: String,
186+
tags: None,
187+
deprecated: None,
188+
range: Range {
189+
start: Position {
190+
line: 17,
191+
character: 4,
192+
},
193+
end: Position {
194+
line: 19,
195+
character: 3,
196+
},
197+
},
198+
selection_range: Range {
199+
start: Position {
200+
line: 17,
201+
character: 4,
202+
},
203+
end: Position {
204+
line: 19,
205+
character: 3,
206+
},
207+
},
208+
children: Some(
209+
[],
210+
),
211+
},
212+
DocumentSymbol {
213+
name: "baz",
214+
detail: None,
215+
kind: String,
216+
tags: None,
217+
deprecated: None,
218+
range: Range {
219+
start: Position {
220+
line: 20,
221+
character: 2,
222+
},
223+
end: Position {
224+
line: 20,
225+
character: 12,
226+
},
227+
},
228+
selection_range: Range {
229+
start: Position {
230+
line: 20,
231+
character: 2,
232+
},
233+
end: Position {
234+
line: 20,
235+
character: 12,
236+
},
237+
},
238+
children: Some(
239+
[],
240+
),
241+
},
242+
],
243+
),
244+
},
245+
],
246+
),
247+
},
248+
]

0 commit comments

Comments
 (0)