Skip to content

Commit 791a2b8

Browse files
authored
Add highlight capture for structs (#112)
This introduces the `@type.module.struct` capture so that a different highlight from modules can be optionally applied
1 parent db684b4 commit 791a2b8

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

.tsqueryrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"type.builtin": "Captures built-in types",
7878
"type.interface": "Captures interface types",
7979
"type.module": "Captures modules",
80+
"type.module.struct": "Captures structs",
8081
"type.spec": "Captures typespecs",
8182
"type.super": "Captures superclass types",
8283
"variable": "Captures variables",

languages/elixir/highlights.scm

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@
7070
(quoted_atom)
7171
] @type.module))
7272

73+
; Structs
74+
(struct
75+
[
76+
(alias)
77+
(atom)
78+
(quoted_atom)
79+
] @type.module.struct)
80+
7381
; Regular identifiers
7482
(identifier) @variable
7583

0 commit comments

Comments
 (0)