Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions changelog/2025-04-addedArgumentListScope.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
tags: [enhancement]
pullRequest: 2907
---

- Added `"arg list"` scope. The argument list is the entire list of arguments in a declared function.
1 change: 1 addition & 0 deletions cursorless-talon/src/spoken_forms.json
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,7 @@
"modifier_scope_types.csv": {
"scope_type": {
"arg": "argumentOrParameter",
"arg list": "argumentList",
"attribute": "attribute",
"call": "functionCall",
"callee": "functionCallee",
Expand Down
46 changes: 46 additions & 0 deletions data/fixtures/scopes/java/argument.formal.constructor2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
public class MyClass {
public MyClass(
String name,
int age
) {}
}
---

[#1 Content] =
[#1 Domain] = 2:8-2:19
>-----------<
2| String name,

[#1 Removal] = 2:8-3:8
>------------
2| String name,
3| int age
--------<

[#1 Trailing delimiter] = 2:19-3:8
>-
2| String name,
3| int age
--------<

[#1 Insertion delimiter] = ",\n"


[#2 Content] =
[#2 Domain] = 3:8-3:15
>-------<
3| int age

[#2 Removal] = 2:19-3:15
>-
2| String name,
3| int age
---------------<

[#2 Leading delimiter] = 2:19-3:8
>-
2| String name,
3| int age
--------<

[#2 Insertion delimiter] = ",\n"
12 changes: 0 additions & 12 deletions data/fixtures/scopes/java/argument.formal.iteration.scope

This file was deleted.

12 changes: 0 additions & 12 deletions data/fixtures/scopes/java/argument.formal.iteration2.scope

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
(aaa, bbb) -> { };
---

[Range] = 0:1-0:9
>--------<
0| (aaa, bbb) -> { };

[Domain] = 0:0-0:17
>-----------------<
0| (aaa, bbb) -> { };
33 changes: 33 additions & 0 deletions data/fixtures/scopes/java/argument.formal.lambda.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
(aaa, bbb) -> { };
---

[#1 Content] =
[#1 Domain] = 0:1-0:4
>---<
0| (aaa, bbb) -> { };

[#1 Removal] = 0:1-0:6
>-----<
0| (aaa, bbb) -> { };

[#1 Trailing delimiter] = 0:4-0:6
>--<
0| (aaa, bbb) -> { };

[#1 Insertion delimiter] = ", "


[#2 Content] =
[#2 Domain] = 0:6-0:9
>---<
0| (aaa, bbb) -> { };

[#2 Removal] = 0:4-0:9
>-----<
0| (aaa, bbb) -> { };

[#2 Leading delimiter] = 0:4-0:6
>--<
0| (aaa, bbb) -> { };

[#2 Insertion delimiter] = ", "
44 changes: 44 additions & 0 deletions data/fixtures/scopes/java/argument.formal.lambda2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
(
aaa,
bbb
) -> { };
---

[#1 Content] =
[#1 Domain] = 1:4-1:7
>---<
1| aaa,

[#1 Removal] = 1:4-2:4
>----
1| aaa,
2| bbb
----<

[#1 Trailing delimiter] = 1:7-2:4
>-
1| aaa,
2| bbb
----<

[#1 Insertion delimiter] = ",\n"


[#2 Content] =
[#2 Domain] = 2:4-2:7
>---<
2| bbb

[#2 Removal] = 1:7-2:7
>-
1| aaa,
2| bbb
-------<

[#2 Leading delimiter] = 1:7-2:4
>-
1| aaa,
2| bbb
----<

[#2 Insertion delimiter] = ",\n"
46 changes: 46 additions & 0 deletions data/fixtures/scopes/java/argument.formal.method2.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
public class MyClass {
public void foo(
String name,
int age
) {}
}
---

[#1 Content] =
[#1 Domain] = 2:8-2:19
>-----------<
2| String name,

[#1 Removal] = 2:8-3:8
>------------
2| String name,
3| int age
--------<

[#1 Trailing delimiter] = 2:19-3:8
>-
2| String name,
3| int age
--------<

[#1 Insertion delimiter] = ",\n"


[#2 Content] =
[#2 Domain] = 3:8-3:15
>-------<
3| int age

[#2 Removal] = 2:19-3:15
>-
2| String name,
3| int age
---------------<

[#2 Leading delimiter] = 2:19-3:8
>-
2| String name,
3| int age
--------<

[#2 Insertion delimiter] = ",\n"
35 changes: 0 additions & 35 deletions data/fixtures/scopes/java/argument.formal.scope

This file was deleted.

46 changes: 0 additions & 46 deletions data/fixtures/scopes/java/argument.formal2.scope

This file was deleted.

35 changes: 0 additions & 35 deletions data/fixtures/scopes/java/argument.formal3.scope

This file was deleted.

15 changes: 15 additions & 0 deletions data/fixtures/scopes/java/argumentList.formal.constructor.scope
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
public class MyClass {
public MyClass(String name, int age) {}
}
---

[Content] =
[Removal] = 1:19-1:39
>--------------------<
1| public MyClass(String name, int age) {}

[Domain] = 1:4-1:43
>---------------------------------------<
1| public MyClass(String name, int age) {}

[Insertion delimiter] = ", "
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
public class MyClass {
public MyClass(
String name,
int age
) {}
}
---

[Content] =
[Removal] = 1:19-4:4
>
1| public MyClass(
2| String name,
3| int age
4| ) {}
----<

[Domain] = 1:4-4:8
>---------------
1| public MyClass(
2| String name,
3| int age
4| ) {}
--------<

[Insertion delimiter] = ",\n"
Loading
Loading