Add operators highlighting
This commit is contained in:
parent
d83fa3acb7
commit
6e40691a35
|
@ -29,4 +29,23 @@
|
|||
(string_literal) @string
|
||||
; }}}
|
||||
|
||||
; Operators {{{
|
||||
(operator) @operator
|
||||
|
||||
[
|
||||
","
|
||||
";"
|
||||
"."
|
||||
] @punctuation.delimiter
|
||||
|
||||
[
|
||||
"("
|
||||
")"
|
||||
"["
|
||||
"]"
|
||||
"{"
|
||||
"}"
|
||||
] @punctuation.bracket
|
||||
; }}}
|
||||
|
||||
; vim: sw=2 foldmethod=marker
|
||||
|
|
42
test/highlight/operators.tig
Normal file
42
test/highlight/operators.tig
Normal file
|
@ -0,0 +1,42 @@
|
|||
(
|
||||
/* <- punctuation.bracket */
|
||||
|
||||
-1 | 2 & 3 + 4 * 5;
|
||||
/* <- operator */
|
||||
/* ^ operator */
|
||||
/* ^ operator */
|
||||
/* ^ operator */
|
||||
/* ^ operator */
|
||||
/* ^ punctuation.delimiter */
|
||||
|
||||
12 >= 27;
|
||||
/* ^ operator */
|
||||
12 <= 27;
|
||||
/* ^ operator */
|
||||
12 = 27;
|
||||
/* ^ operator */
|
||||
12 <> 27;
|
||||
/* ^ operator */
|
||||
12 < 27;
|
||||
/* ^ operator */
|
||||
12 > 27;
|
||||
/* ^ operator */
|
||||
|
||||
record.field;
|
||||
/* ^ punctuation.delimiter */
|
||||
|
||||
func(a, b);
|
||||
/* ^ punctuation.bracket */
|
||||
/* ^ punctuation.bracket */
|
||||
/* ^ punctuation.delimiter */
|
||||
|
||||
record_type { };
|
||||
/* ^ punctuation.bracket */
|
||||
/* ^ punctuation.bracket */
|
||||
|
||||
array[42]
|
||||
/* ^ punctuation.bracket */
|
||||
/* ^ punctuation.bracket */
|
||||
|
||||
)
|
||||
/* <- punctuation.bracket */
|
Loading…
Reference in a new issue