Skip to content

Commit ee07993

Browse files
committed
feat: add outline scm for jump among script style and template
1 parent 6fc517f commit ee07993

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

languages/vue/outline.scm

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
; Comments appear as annotations in the outline
3+
(comment) @annotation
4+
5+
; ========== template =========
6+
(template_element
7+
(start_tag
8+
(tag_name) @name
9+
(attribute
10+
(attribute_name) @_lang
11+
(quoted_attribute_value (attribute_value) @annotation))?)
12+
(#eq? @_lang "lang")) @item
13+
14+
; ======= script ======
15+
(script_element
16+
(start_tag
17+
(tag_name) @name
18+
(attribute
19+
(attribute_name) @_lang
20+
(quoted_attribute_value (attribute_value) @annotation))?)
21+
(#eq? @_lang "lang")) @item
22+
23+
24+
; ========= style =========
25+
(style_element
26+
(start_tag
27+
(tag_name) @name
28+
(attribute
29+
(attribute_name) @_lang
30+
(quoted_attribute_value (attribute_value) @annotation))?)
31+
(#eq? @_lang "lang")) @item

0 commit comments

Comments
 (0)