-
-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial tree-sitter support for .scm files
- Loading branch information
Showing
12 changed files
with
261 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearComment.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear comment | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: comment} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: ;; aaa | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
29 changes: 29 additions & 0 deletions
29
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearEveryState.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear every state | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: everyScope | ||
scopeType: {type: statement} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: |- | ||
(aaa) @bbb | ||
;; ccc | ||
(ddd) @eee | ||
selections: | ||
- anchor: {line: 2, character: 10} | ||
active: {line: 2, character: 10} | ||
marks: {} | ||
finalState: | ||
documentContents: | | ||
;; ccc | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
- anchor: {line: 2, character: 0} | ||
active: {line: 2, character: 0} |
22 changes: 22 additions & 0 deletions
22
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearItem.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear item | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: collectionItem} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: ;; (aaa) | ||
selections: | ||
- anchor: {line: 0, character: 4} | ||
active: {line: 0, character: 4} | ||
marks: {} | ||
finalState: | ||
documentContents: ;; () | ||
selections: | ||
- anchor: {line: 0, character: 4} | ||
active: {line: 0, character: 4} |
22 changes: 22 additions & 0 deletions
22
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearRound.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear round | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: surroundingPair, delimiter: parentheses} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: (aaa) | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
22 changes: 22 additions & 0 deletions
22
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearRound2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear round | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: surroundingPair, delimiter: parentheses} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: ;; (aaa) | ||
selections: | ||
- anchor: {line: 0, character: 3} | ||
active: {line: 0, character: 3} | ||
marks: {} | ||
finalState: | ||
documentContents: ";; " | ||
selections: | ||
- anchor: {line: 0, character: 3} | ||
active: {line: 0, character: 3} |
22 changes: 22 additions & 0 deletions
22
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearRound3.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear round | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: surroundingPair, delimiter: parentheses} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: "\"(aaa)\" @bbb" | ||
selections: | ||
- anchor: {line: 0, character: 1} | ||
active: {line: 0, character: 1} | ||
marks: {} | ||
finalState: | ||
documentContents: "\"\" @bbb" | ||
selections: | ||
- anchor: {line: 0, character: 1} | ||
active: {line: 0, character: 1} |
18 changes: 18 additions & 0 deletions
18
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearState.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear state | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: statement} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: ;; aaa | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: {} | ||
thrownError: {name: NoContainingScopeError} |
22 changes: 22 additions & 0 deletions
22
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearState2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear state | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: statement} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: (aaa) @bbb | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
26 changes: 26 additions & 0 deletions
26
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearState3.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear state | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: statement} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: |- | ||
( | ||
(aaa) @bbb | ||
(#ccc? @bbb) | ||
) | ||
selections: | ||
- anchor: {line: 1, character: 4} | ||
active: {line: 1, character: 4} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
26 changes: 26 additions & 0 deletions
26
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearState4.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear state | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: statement} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: |- | ||
( | ||
(aaa) @bbb | ||
(#ccc? @bbb) | ||
) | ||
selections: | ||
- anchor: {line: 2, character: 4} | ||
active: {line: 2, character: 4} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
22 changes: 22 additions & 0 deletions
22
packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/scm/clearState5.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
languageId: scm | ||
command: | ||
version: 5 | ||
spokenForm: clear state | ||
action: {name: clearAndSetSelection} | ||
targets: | ||
- type: primitive | ||
modifiers: | ||
- type: containingScope | ||
scopeType: {type: statement} | ||
usePrePhraseSnapshot: true | ||
initialState: | ||
documentContents: "[(aaa) (bbb)] @ccc" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} | ||
marks: {} | ||
finalState: | ||
documentContents: "" | ||
selections: | ||
- anchor: {line: 0, character: 0} | ||
active: {line: 0, character: 0} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
( | ||
(program | ||
(_) @statement | ||
) @_.iteration | ||
(#not-type? @statement comment) | ||
) | ||
(comment) @comment @textFragment | ||
(anonymous_node) @string @textFragment |