Skip to content

Commit e72f86a

Browse files
Add record to highlights / outline
1 parent 81c608f commit e72f86a

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

languages/crystal/highlights.scm

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@
8282
(self)
8383
] @variable.special
8484

85+
(comment) @comment
86+
8587
(
8688
(comment)+ @comment.doc
8789
.
@@ -102,8 +104,6 @@
102104
]
103105
)
104106

105-
(comment) @comment
106-
107107
; Operators and punctuation
108108
[
109109
"="
@@ -206,3 +206,7 @@
206206
(_) @function
207207
])
208208
(#match? @keyword "(class_)?(getter|setter|property)[?!]?"))
209+
210+
(call
211+
method: (_) @keyword
212+
(#match? @keyword "record"))

languages/crystal/outline.scm

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,10 @@
5757
method: (_) @context
5858
arguments: (_) @name
5959
(#match? @context "(class_)?(getter|setter|property)[?!]?")) @item
60+
61+
62+
(call
63+
method: (_) @context
64+
arguments: (argument_list
65+
(constant) @name)
66+
(#match? @context "record")) @item

0 commit comments

Comments
 (0)