2022-11-08 05:43:00 +04:00
|
|
|
; Class and Modules
|
|
|
|
(class
|
|
|
|
body: (_)? @class.inside) @class.around
|
2022-04-18 04:25:44 +04:00
|
|
|
|
|
|
|
(singleton_class
|
|
|
|
value: (_)
|
|
|
|
(_)+ @class.inside) @class.around
|
|
|
|
|
|
|
|
(call
|
|
|
|
receiver: (constant) @class_const
|
|
|
|
method: (identifier) @class_method
|
|
|
|
(#match? @class_const "Class")
|
|
|
|
(#match? @class_method "new")
|
|
|
|
(do_block (_)+ @class.inside)) @class.around
|
2022-11-08 05:43:00 +04:00
|
|
|
|
|
|
|
(module
|
|
|
|
body: (_)? @class.inside) @class.around
|
2022-04-18 04:25:44 +04:00
|
|
|
|
2022-11-08 05:43:00 +04:00
|
|
|
; Functions and Blocks
|
|
|
|
(singleton_method
|
|
|
|
body: (_)? @function.inside) @function.around
|
2022-04-18 04:25:44 +04:00
|
|
|
|
2022-11-08 05:43:00 +04:00
|
|
|
(method
|
|
|
|
body: (_)? @function.inside) @function.around
|
|
|
|
|
|
|
|
(do_block
|
|
|
|
body: (_)? @function.inside) @function.around
|
|
|
|
|
|
|
|
(block
|
|
|
|
body: (_)? @function.inside) @function.around
|
2022-04-18 04:25:44 +04:00
|
|
|
|
|
|
|
; Parameters
|
|
|
|
(method_parameters
|
2022-11-08 05:43:00 +04:00
|
|
|
(_) @parameter.inside) @parameter.around
|
2022-04-18 04:25:44 +04:00
|
|
|
|
|
|
|
(block_parameters
|
2022-11-08 05:43:00 +04:00
|
|
|
(_) @parameter.inside) @parameter.around
|
2022-04-18 04:25:44 +04:00
|
|
|
|
|
|
|
(lambda_parameters
|
2022-11-08 05:43:00 +04:00
|
|
|
(_) @parameter.inside) @parameter.around
|
2022-04-18 04:25:44 +04:00
|
|
|
|
|
|
|
; Comments
|
|
|
|
(comment) @comment.inside
|
|
|
|
(comment)+ @comment.around
|
2024-03-31 20:53:15 +04:00
|
|
|
|
|
|
|
(pair
|
|
|
|
(_) @entry.inside) @entry.around
|
|
|
|
|
|
|
|
(array
|
|
|
|
(_) @entry.around)
|
|
|
|
|
|
|
|
(string_array
|
|
|
|
(_) @entry.around)
|
|
|
|
|
|
|
|
(symbol_array
|
|
|
|
(_) @entry.around)
|