Skip to content

Migrate rust scope implementations #2950

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/changeArgBlueAir.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: change arg blue air
spokenForm: change type blue air
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
scopeType: {type: type}
mark: {type: decoratedSymbol, symbolColor: blue, character: a}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/changeArgSun.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: change arg sun
spokenForm: change type sun
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
scopeType: {type: type}
mark: {type: decoratedSymbol, symbolColor: default, character: s}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/changeArgTrap.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: change arg trap
spokenForm: change type trap
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
scopeType: {type: type}
mark: {type: decoratedSymbol, symbolColor: default, character: t}
usePrePhraseSnapshot: true
initialState:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
languageId: rust
command:
version: 6
spokenForm: change arg trap and blue trap
spokenForm: change arg trap and type blue trap
action:
name: clearAndSetSelection
target:
Expand All @@ -13,6 +13,9 @@ command:
scopeType: {type: argumentOrParameter}
Copy link
Member

@auscompgeek auscompgeek Jun 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this also be a type? (How do we handle tuple types in TypeScript?)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Which one?
You mean typed arrays like [number, string]? Those are just collection items and not usable as type.

mark: {type: decoratedSymbol, symbolColor: default, character: t}
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: type}
mark: {type: decoratedSymbol, symbolColor: blue, character: t}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/changeNameDrum2.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: change name drum
spokenForm: change key drum
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: name}
scopeType: {type: collectionKey}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks more like a key / value map than call arguments

mark: {type: decoratedSymbol, symbolColor: default, character: d}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/changeNameDrum3.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: change name drum
spokenForm: change key drum
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: name}
scopeType: {type: collectionKey}
mark: {type: decoratedSymbol, symbolColor: default, character: d}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/changeNameJury.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: change name jury
spokenForm: change key jury
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: name}
scopeType: {type: collectionKey}
mark: {type: decoratedSymbol, symbolColor: default, character: j}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/changeNameLook.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: change name look
spokenForm: change key look
action:
name: clearAndSetSelection
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: name}
scopeType: {type: collectionKey}
mark: {type: decoratedSymbol, symbolColor: default, character: l}
usePrePhraseSnapshot: true
initialState:
Expand Down
6 changes: 3 additions & 3 deletions data/fixtures/recorded/languages/rust/changeTypeTrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ initialState:
end: {line: 0, character: 18}
finalState:
documentContents: |
fn some_function<T: , U: Clone + Debug>(t: &T, u: &U) -> i32 {
fn some_function<, U: Clone + Debug>(t: &T, u: &U) -> i32 {
}
selections:
- anchor: {line: 0, character: 20}
active: {line: 0, character: 20}
- anchor: {line: 0, character: 17}
active: {line: 0, character: 17}
6 changes: 3 additions & 3 deletions data/fixtures/recorded/languages/rust/changeTypeTrap3.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ initialState:
finalState:
documentContents: |
fn some_function<T, U>(t: &T, u: &U) -> i32
where T: ,
where ,
U: Clone + Debug
{}
selections:
- anchor: {line: 1, character: 13}
active: {line: 1, character: 13}
- anchor: {line: 1, character: 10}
active: {line: 1, character: 10}
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/chuckArgAir.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: chuck arg air
spokenForm: chuck type air
action:
name: remove
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
scopeType: {type: type}
mark: {type: decoratedSymbol, symbolColor: default, character: a}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/chuckArgBlueAir.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: chuck arg blue air
spokenForm: chuck type blue air
action:
name: remove
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
scopeType: {type: type}
mark: {type: decoratedSymbol, symbolColor: blue, character: a}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/chuckArgSun2.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: chuck arg sun
spokenForm: chuck type sun
action:
name: remove
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
scopeType: {type: type}
mark: {type: decoratedSymbol, symbolColor: default, character: s}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/chuckArgTrap.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: chuck arg trap
spokenForm: chuck type trap
action:
name: remove
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: argumentOrParameter}
scopeType: {type: type}
mark: {type: decoratedSymbol, symbolColor: default, character: t}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/chuckNameFine.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: chuck name fine
spokenForm: chuck key fine
action:
name: remove
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: name}
scopeType: {type: collectionKey}
mark: {type: decoratedSymbol, symbolColor: default, character: f}
usePrePhraseSnapshot: true
initialState:
Expand Down
4 changes: 2 additions & 2 deletions data/fixtures/recorded/languages/rust/chuckNameJury.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
languageId: rust
command:
version: 6
spokenForm: chuck name jury
spokenForm: chuck key jury
action:
name: remove
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: name}
scopeType: {type: collectionKey}
mark: {type: decoratedSymbol, symbolColor: default, character: j}
usePrePhraseSnapshot: true
initialState:
Expand Down
31 changes: 0 additions & 31 deletions data/fixtures/recorded/languages/rust/clearValue3.yml
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In no other language is the domain for the return value the entire function. This is also extra problematic since you can have multiple return statements.

This file was deleted.

31 changes: 0 additions & 31 deletions data/fixtures/recorded/languages/rust/clearValue6.yml

This file was deleted.

37 changes: 0 additions & 37 deletions data/fixtures/recorded/languages/rust/clearValue8.yml

This file was deleted.

Loading
Loading