|
33 | 33 | ;; ---------------------------------------------------------------------------- |
34 | 34 | ;; Keywords, operators, includes |
35 | 35 |
|
| 36 | +(module) @type.builtin |
36 | 37 | [ |
37 | 38 | "forall" |
38 | 39 | "∀" |
39 | 40 | ] @repeat |
40 | 41 |
|
41 | | -(pragma) @constant.macro |
| 42 | +(pragma) @comment |
42 | 43 |
|
43 | 44 | [ |
44 | 45 | "if" |
45 | 46 | "then" |
46 | 47 | "else" |
47 | 48 | "case" |
48 | 49 | "of" |
49 | | -] @conditional |
| 50 | +] @keyword |
50 | 51 |
|
51 | 52 | [ |
52 | 53 | "import" |
53 | 54 | "qualified" |
54 | 55 | "module" |
55 | | -] @include |
| 56 | +] @keyword |
56 | 57 |
|
57 | 58 | [ |
58 | 59 | (operator) |
|
103 | 104 | ;; ---------------------------------------------------------------------------- |
104 | 105 | ;; Functions and variables |
105 | 106 |
|
106 | | -(variable) @variable |
107 | | -(pat_wildcard) @variable |
108 | 107 |
|
109 | | -(signature name: (variable) @type) |
110 | | -(function |
111 | | - name: (variable) @function |
112 | | - patterns: (patterns)) |
113 | | -((signature (fun)) . (function (variable) @function)) |
114 | | -((signature (context (fun))) . (function (variable) @function)) |
115 | | -((signature (forall (context (fun)))) . (function (variable) @function)) |
| 108 | +(pat_name . (constructor) @constructor) |
| 109 | +(pat_wildcard) @operator |
| 110 | +;; (pat_apply . (constructor) @constructor) |
| 111 | +(signature name: (variable) @function) |
| 112 | +;; (function name: (variable) @function patterns: (pat_apply) @constructor) |
| 113 | +(function name: (variable) @function.call patterns: (patterns) @variable.parameter) |
| 114 | +((signature (fun)) . (function (fun) @function.call)) |
| 115 | +((signature (context (fun))) . (function (fun) @variable)) |
| 116 | +((signature (forall (context (fun)))) . (function (variable) @variable)) |
116 | 117 |
|
117 | 118 | (exp_infix (variable) @operator) ; consider infix functions as operators |
118 | 119 |
|
119 | | -(exp_infix (exp_name) @function (#set! "priority" 101)) |
120 | | -(exp_apply . (exp_name (variable) @function)) |
121 | | -(exp_apply . (exp_name (qualified_variable (variable) @function))) |
| 120 | +(exp_infix (exp_name (variable) @property)) |
| 121 | +(exp_apply . (exp_name (variable) @function.call)) |
| 122 | +(exp_apply . (exp_name (qualified_variable (variable) @function.call))) |
122 | 123 |
|
| 124 | +(record_fields (field (variable) @constant )) |
| 125 | +(variable) @variable |
123 | 126 |
|
124 | 127 | ;; ---------------------------------------------------------------------------- |
125 | 128 | ;; Types |
126 | 129 |
|
127 | 130 | (type) @type |
128 | | -(type_variable) @type |
| 131 | +(type_variable) @type.argument |
129 | 132 |
|
130 | 133 | (constructor) @constructor |
131 | 134 |
|
|
136 | 139 | ;; ---------------------------------------------------------------------------- |
137 | 140 | ;; Quasi-quotes |
138 | 141 |
|
139 | | -(quoter) @function |
| 142 | +(quoter) @function.call |
140 | 143 | ; Highlighting of quasiquote_body is handled by injections.scm |
0 commit comments