Skip to content

Commit f9970af

Browse files
committed
Initial tree-sitter support for .scm files
1 parent 65fab51 commit f9970af

33 files changed

+887
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear call
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: containingScope
10+
scopeType: {type: functionCall}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: |-
14+
(
15+
(aaa)
16+
(#bbb! @aaa)
17+
)
18+
selections:
19+
- anchor: {line: 2, character: 4}
20+
active: {line: 2, character: 4}
21+
marks: {}
22+
finalState:
23+
documentContents: |-
24+
(
25+
(aaa)
26+
27+
)
28+
selections:
29+
- anchor: {line: 2, character: 4}
30+
active: {line: 2, character: 4}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear callee
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: containingScope
10+
scopeType: {type: functionCallee}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: |-
14+
(
15+
(aaa)
16+
(#bbb! @aaa)
17+
)
18+
selections:
19+
- anchor: {line: 2, character: 4}
20+
active: {line: 2, character: 4}
21+
marks: {}
22+
finalState:
23+
documentContents: |-
24+
(
25+
(aaa)
26+
(#! @aaa)
27+
)
28+
selections:
29+
- anchor: {line: 2, character: 6}
30+
active: {line: 2, character: 6}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear comment
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: containingScope
10+
scopeType: {type: comment}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: ;; aaa
14+
selections:
15+
- anchor: {line: 0, character: 0}
16+
active: {line: 0, character: 0}
17+
marks: {}
18+
finalState:
19+
documentContents: ""
20+
selections:
21+
- anchor: {line: 0, character: 0}
22+
active: {line: 0, character: 0}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear every argue
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: everyScope
10+
scopeType: {type: argumentOrParameter}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: |-
14+
(
15+
(aaa)
16+
(#bbb! @aaa "ccc")
17+
)
18+
selections:
19+
- anchor: {line: 2, character: 4}
20+
active: {line: 2, character: 4}
21+
marks: {}
22+
finalState:
23+
documentContents: |-
24+
(
25+
(aaa)
26+
(#bbb! )
27+
)
28+
selections:
29+
- anchor: {line: 2, character: 11}
30+
active: {line: 2, character: 11}
31+
- anchor: {line: 2, character: 12}
32+
active: {line: 2, character: 12}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear every call
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: everyScope
10+
scopeType: {type: functionCall}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: |-
14+
(
15+
(aaa)
16+
(#bbb! @aaa)
17+
(#ccc! @aaa)
18+
)
19+
selections:
20+
- anchor: {line: 1, character: 4}
21+
active: {line: 1, character: 4}
22+
marks: {}
23+
finalState:
24+
documentContents: |-
25+
(
26+
(aaa)
27+
28+
29+
)
30+
selections:
31+
- anchor: {line: 2, character: 4}
32+
active: {line: 2, character: 4}
33+
- anchor: {line: 3, character: 4}
34+
active: {line: 3, character: 4}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear every callee
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: everyScope
10+
scopeType: {type: functionCallee}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: |-
14+
(
15+
(aaa)
16+
(#bbb! @aaa)
17+
(#ccc! @aaa)
18+
)
19+
selections:
20+
- anchor: {line: 1, character: 4}
21+
active: {line: 1, character: 4}
22+
marks: {}
23+
finalState:
24+
documentContents: |-
25+
(
26+
(aaa)
27+
(#! @aaa)
28+
(#! @aaa)
29+
)
30+
selections:
31+
- anchor: {line: 2, character: 6}
32+
active: {line: 2, character: 6}
33+
- anchor: {line: 3, character: 6}
34+
active: {line: 3, character: 6}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear every entry
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: everyScope
10+
scopeType: {type: collectionItem}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: "[(aaa) (bbb)]"
14+
selections:
15+
- anchor: {line: 0, character: 1}
16+
active: {line: 0, character: 1}
17+
marks: {}
18+
finalState:
19+
documentContents: "[ ]"
20+
selections:
21+
- anchor: {line: 0, character: 1}
22+
active: {line: 0, character: 1}
23+
- anchor: {line: 0, character: 2}
24+
active: {line: 0, character: 2}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear every entry
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: everyScope
10+
scopeType: {type: collectionItem}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: |-
14+
(
15+
[(aaa) (bbb)]
16+
(ccc)
17+
)
18+
selections:
19+
- anchor: {line: 1, character: 4}
20+
active: {line: 1, character: 4}
21+
marks: {}
22+
finalState:
23+
documentContents: |-
24+
(
25+
26+
27+
)
28+
selections:
29+
- anchor: {line: 1, character: 4}
30+
active: {line: 1, character: 4}
31+
- anchor: {line: 2, character: 4}
32+
active: {line: 2, character: 4}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear every entry
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: everyScope
10+
scopeType: {type: collectionItem}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: |-
14+
(ddd
15+
[(aaa) (bbb)]
16+
(ccc)
17+
)
18+
selections:
19+
- anchor: {line: 0, character: 1}
20+
active: {line: 0, character: 1}
21+
marks: {}
22+
finalState:
23+
documentContents: |-
24+
(ddd
25+
26+
27+
)
28+
selections:
29+
- anchor: {line: 1, character: 4}
30+
active: {line: 1, character: 4}
31+
- anchor: {line: 2, character: 4}
32+
active: {line: 2, character: 4}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear every name
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: everyScope
10+
scopeType: {type: name}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: (aaa) @bbb @ccc
14+
selections:
15+
- anchor: {line: 0, character: 0}
16+
active: {line: 0, character: 0}
17+
marks: {}
18+
finalState:
19+
documentContents: "(aaa) "
20+
selections:
21+
- anchor: {line: 0, character: 6}
22+
active: {line: 0, character: 6}
23+
- anchor: {line: 0, character: 7}
24+
active: {line: 0, character: 7}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear every name
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: everyScope
10+
scopeType: {type: name}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: "[(aaa) (bbb)] @ccc @ddd"
14+
selections:
15+
- anchor: {line: 0, character: 0}
16+
active: {line: 0, character: 0}
17+
marks: {}
18+
finalState:
19+
documentContents: "[(aaa) (bbb)] "
20+
selections:
21+
- anchor: {line: 0, character: 14}
22+
active: {line: 0, character: 14}
23+
- anchor: {line: 0, character: 15}
24+
active: {line: 0, character: 15}
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear every state
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: everyScope
10+
scopeType: {type: statement}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: |-
14+
(aaa) @bbb
15+
;; ccc
16+
(ddd) @eee
17+
selections:
18+
- anchor: {line: 2, character: 10}
19+
active: {line: 2, character: 10}
20+
marks: {}
21+
finalState:
22+
documentContents: |
23+
24+
;; ccc
25+
selections:
26+
- anchor: {line: 0, character: 0}
27+
active: {line: 0, character: 0}
28+
- anchor: {line: 2, character: 0}
29+
active: {line: 2, character: 0}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
languageId: scm
2+
command:
3+
version: 5
4+
spokenForm: clear item
5+
action: {name: clearAndSetSelection}
6+
targets:
7+
- type: primitive
8+
modifiers:
9+
- type: containingScope
10+
scopeType: {type: collectionItem}
11+
usePrePhraseSnapshot: true
12+
initialState:
13+
documentContents: ;; (aaa)
14+
selections:
15+
- anchor: {line: 0, character: 4}
16+
active: {line: 0, character: 4}
17+
marks: {}
18+
finalState:
19+
documentContents: ;; ()
20+
selections:
21+
- anchor: {line: 0, character: 4}
22+
active: {line: 0, character: 4}

0 commit comments

Comments
 (0)