Skip to content
Merged
Show file tree
Hide file tree
Changes from 16 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
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ initialState:
blue.a:
start: {line: 0, character: 18}
end: {line: 0, character: 19}
finalState:
documentContents: |
struct S<'a, , T>;
selections:
- anchor: {line: 0, character: 13}
active: {line: 0, character: 13}
thrownError: {name: NoContainingScopeError}
8 changes: 1 addition & 7 deletions data/fixtures/recorded/languages/rust/changeArgSun.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,4 @@ initialState:
default.s:
start: {line: 0, character: 20}
end: {line: 0, character: 27}
finalState:
documentContents: |-
fn some_function<, U: Clone + Debug>(t: &T, u: &U) -> i32 {
}
selections:
- anchor: {line: 0, character: 17}
active: {line: 0, character: 17}
thrownError: {name: NoContainingScopeError}
7 changes: 1 addition & 6 deletions data/fixtures/recorded/languages/rust/changeArgTrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ initialState:
default.t:
start: {line: 0, character: 21}
end: {line: 0, character: 22}
finalState:
documentContents: |
struct S<'a, 'b: 'a, > {};
selections:
- anchor: {line: 0, character: 21}
active: {line: 0, character: 21}
thrownError: {name: NoContainingScopeError}
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,4 @@ initialState:
blue.t:
start: {line: 0, character: 11}
end: {line: 0, character: 12}
finalState:
documentContents: |
enum Maybe<> {
Just(),
Nothing,
}
selections:
- anchor: {line: 0, character: 11}
active: {line: 0, character: 11}
- anchor: {line: 1, character: 9}
active: {line: 1, character: 9}
thrownError: {name: NoContainingScopeError}
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
7 changes: 1 addition & 6 deletions data/fixtures/recorded/languages/rust/chuckArgAir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ initialState:
default.a:
start: {line: 0, character: 10}
end: {line: 0, character: 11}
finalState:
documentContents: |
struct S<'b: 'a, T>;
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thrownError: {name: NoContainingScopeError}
7 changes: 1 addition & 6 deletions data/fixtures/recorded/languages/rust/chuckArgBlueAir.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ initialState:
blue.a:
start: {line: 0, character: 18}
end: {line: 0, character: 19}
finalState:
documentContents: |
struct S<'a, T>;
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thrownError: {name: NoContainingScopeError}
8 changes: 1 addition & 7 deletions data/fixtures/recorded/languages/rust/chuckArgSun2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,4 @@ initialState:
default.s:
start: {line: 0, character: 20}
end: {line: 0, character: 27}
finalState:
documentContents: |-
fn some_function<U: Clone + Debug>(t: &T, u: &U) -> i32 {
}
selections:
- anchor: {line: 1, character: 1}
active: {line: 1, character: 1}
thrownError: {name: NoContainingScopeError}
7 changes: 1 addition & 6 deletions data/fixtures/recorded/languages/rust/chuckArgTrap.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,4 @@ initialState:
default.t:
start: {line: 0, character: 21}
end: {line: 0, character: 22}
finalState:
documentContents: |
struct S<'a, 'b: 'a> {};
selections:
- anchor: {line: 1, character: 0}
active: {line: 1, character: 0}
thrownError: {name: NoContainingScopeError}
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.

35 changes: 0 additions & 35 deletions data/fixtures/recorded/languages/rust/clearValue9.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
* The language IDs that we have full tree-sitter support for using our legacy
* modifiers.
*/
export const legacyLanguageIds = ["rust"] as const;
export const legacyLanguageIds = ["dummy"] as const;
Copy link
Member Author

Choose a reason for hiding this comment

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

Compilation error if this list is empty. Cleaning up all the legacy machinery will be done in a follow up.


export type LegacyLanguageId = (typeof legacyLanguageIds)[number];
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import type {
import { notSupported } from "../util/nodeMatchers";
import { selectionWithEditorFromRange } from "../util/selectionUtils";
import type { LegacyLanguageId } from "./LegacyLanguageId";
import rust from "./rust";

export function getNodeMatcher(
languageId: string,
Expand Down Expand Up @@ -39,7 +38,7 @@ export const languageMatchers: Record<
LegacyLanguageId,
Partial<Record<SimpleScopeTypeType, NodeMatcher>>
> = {
rust,
"dummy": {},
};

function matcherIncludeSiblings(matcher: NodeMatcher): NodeMatcher {
Expand Down
Loading
Loading