File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 11(class_definition
22 body: (_) @context.end ) @context
33
4+ ; If the function starts with a comment, then use that to end the context.
5+ ;
6+ ; Note: priority of overlapping rules isn't defined, but this one seems to
7+ ; always take precedence over the one below, regardless of the order in which
8+ ; they are defined. Maybe the smallest match wins?
9+ (function_definition
10+ (comment) @context.end ) @context
11+
412(function_definition
513 body: (_) @context.end ) @context
614
Original file line number Diff line number Diff line change @@ -4,3 +4,13 @@ def hello(name: str, age: int) -> None: # {{CONTEXT}}
44
55
66 # {{CURSOR}}
7+
8+ def hello2 ( # {{CONTEXT}}
9+ name : str , # {{CONTEXT}}
10+ age : int ) -> None : # {{CONTEXT}}
11+ # comment
12+
13+
14+
15+
16+ name = 'barry' # {{CURSOR}}
You can’t perform that action at this time.
0 commit comments