Skip to content

Commit aff30df

Browse files
sam-mccallthe-mikedavis
authored andcommitted
c/c++ highlights: *& are @type or @operator based on context (helix-editor#4278)
1 parent 28d7a1e commit aff30df

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

runtime/queries/c/highlights.scm

+3
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151
(preproc_directive)
5252
] @keyword.directive
5353

54+
(pointer_declarator "*" @type.builtin)
55+
(abstract_pointer_declarator "*" @type.builtin)
56+
5457
[
5558
"+"
5659
"-"

runtime/queries/cpp/highlights.scm

+4
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,10 @@
3434
(auto) @type
3535
"decltype" @type
3636

37+
(ref_qualifier ["&" "&&"] @type.builtin)
38+
(reference_declarator ["&" "&&"] @type.builtin)
39+
(abstract_reference_declarator ["&" "&&"] @type.builtin)
40+
3741
; Constants
3842

3943
(this) @variable.builtin

0 commit comments

Comments
 (0)