Debian Codegraph @

runtime/queries/ponylang/textobjects.scm

raw symbols SCIP
1 ;; Queries for helix to select textobjects: https://docs.helix-editor.com/usage.html#textobjects
2 ;; function.inside
3 ;; function.around
4 ;; class.inside
5 ;; class.around
6 ;; test.inside
7 ;; test.around
8 ;; parameter.inside
9 ;; comment.inside
10 ;; comment.around
11
12 ;; Queries for navigating using textobjects
13
14 [
15 (line_comment)
16 (block_comment)
17 ] @comment.inside
18
19 (line_comment)+ @comment.around
20 (block_comment) @comment.around
21
22 (entity members: (members)? @class.inside) @class.around
23 (object members: (members)? @class.inside) @class.around
24
25 (method
26 body: (block)? @function.inside
27 ) @function.around
28 (behavior
29 body: (block)? @function.inside
30 ) @function.around
31 (constructor
32 body: (block)? @function.inside
33 ) @function.around
34 (lambda
35 body: (block)? @function.inside
36 ) @function.around
37
38 (params
39 ((_) @parameter.inside . ","? @parameter.around) @parameter.around
40 )
41 (lambda
42 params: ((_) @parameter.inside . ","? @parameter.around) @parameter.around
43 )
44 (typeargs
45 ((_) @parameter.inside . ","? @parameter.around) @parameter.around
46 )
47 (typeparams
48 ((_) @parameter.inside . ","? @parameter.around) @parameter.around
49 )
50 (arguments
51 positional: (positional_args
52 ((_) @parameter.inside . ","? @parameter.around)? @parameter.around)
53 ; TODO: get named args right
54 named: (named_args ((_) @parameter.inside . ","? @parameter.around)? @parameter.around)
55 )
56
57 (
58 (entity
59 provides: (type (nominal_type name: (identifier) @_provides))
60 members: (members) @test.inside
61 ) @test.around
62 (#eq? @_provides "UnitTest")
63 )
64