Skip to content

Commit 172c100

Browse files
committed
feat: tags support
1 parent ee07993 commit 172c100

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

languages/vue/outline.scm

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11

2+
23
; Comments appear as annotations in the outline
34
(comment) @annotation
45

@@ -11,7 +12,21 @@
1112
(quoted_attribute_value (attribute_value) @annotation))?)
1213
(#eq? @_lang "lang")) @item
1314

15+
Custom elements/components (PascalCase or hyphenated) - self-closing tags
16+
(
17+
(element
18+
(self_closing_tag
19+
(tag_name) @name))
20+
(#match? @name "^[A-Z]|-")
21+
) @item
22+
23+
; normal tags
24+
(element
25+
(start_tag
26+
(tag_name) @name)) @item
27+
1428
; ======= script ======
29+
1530
(script_element
1631
(start_tag
1732
(tag_name) @name

0 commit comments

Comments
 (0)