File tree Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Expand file tree Collapse file tree 6 files changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -193,8 +193,9 @@ We use a similar set of scopes as
193
193
- ` operator ` - ` || ` , ` += ` , ` > `
194
194
195
195
- ` function `
196
- - ` builtin `
197
- - ` method `
196
+ - ` declaration ` - Declaration of a function (e.g. ` fn foo() { } ` in Rust)
197
+ - ` builtin ` - Built-in functions (e.q. ` println! ` in Rust)
198
+ - ` method ` - Methods
198
199
- ` macro `
199
200
- ` special ` (preprocessor in C)
200
201
Original file line number Diff line number Diff line change 109
109
(char_literal) @constant.character
110
110
111
111
(call_expression
112
- function: (identifier) @function )
112
+ function: (identifier) @function.declaration )
113
113
(call_expression
114
114
function: (field_expression
115
- field: (field_identifier) @function ))
115
+ field: (field_identifier) @function.declaration ))
116
116
(call_expression (argument_list (identifier) @variable ))
117
117
(function_declarator
118
- declarator: [(identifier) (field_identifier)] @function )
118
+ declarator: [(identifier) (field_identifier)] @function.declaration )
119
119
(parameter_declaration
120
120
declarator: (identifier) @variable.parameter )
121
121
(parameter_declaration
Original file line number Diff line number Diff line change 26
26
(function
27
27
name: (identifier) @function )
28
28
(function_declaration
29
- name: (identifier) @function )
29
+ name: (identifier) @function.declaration )
30
30
(method_definition
31
- name: (property_identifier) @function.method )
31
+ name: (property_identifier) @function.declaration )
32
32
33
33
(pair
34
34
key: (property_identifier) @function.method
Original file line number Diff line number Diff line change 14
14
; Function definitions
15
15
16
16
(function_declaration
17
- name: (identifier) @function )
17
+ name: (identifier) @function.declaration )
18
18
19
19
(method_declaration
20
- name: (field_identifier) @function.method )
20
+ name: (field_identifier) @function.declaration )
21
21
22
22
; Identifiers
23
23
Original file line number Diff line number Diff line change 263
263
])
264
264
265
265
(function_item
266
- name: (identifier) @function)
266
+ name: (identifier) @function.declaration )
267
267
268
268
(function_signature_item
269
- name: (identifier) @function)
269
+ name: (identifier) @function.declaration )
270
270
271
271
; ---
272
272
; Macros
Original file line number Diff line number Diff line change 32
32
"keyword.control.exception" = " purple"
33
33
"operator" = " light"
34
34
"function" = " yellow"
35
- "function.macro " = " green "
35
+ "function.declaration " = { fg = " lightest " , modifiers = [ " bold " ] }
36
36
"function.builtin" = " green"
37
37
"function.special" = " green"
38
38
"function.method" = " light"
You can’t perform that action at this time.
0 commit comments