Skip to content

Commit

Permalink
Initial tree-sitter support for .scm files
Browse files Browse the repository at this point in the history
  • Loading branch information
pokey committed Jun 8, 2023
1 parent 65fab51 commit db358bb
Show file tree
Hide file tree
Showing 33 changed files with 897 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
languageId: scm
command:
version: 5
spokenForm: clear call
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCall}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
(
(aaa)
(#bbb! @aaa)
)
selections:
- anchor: {line: 2, character: 4}
active: {line: 2, character: 4}
marks: {}
finalState:
documentContents: |-
(
(aaa)
)
selections:
- anchor: {line: 2, character: 4}
active: {line: 2, character: 4}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
languageId: scm
command:
version: 5
spokenForm: clear callee
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: containingScope
scopeType: {type: functionCallee}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
(
(aaa)
(#bbb! @aaa)
)
selections:
- anchor: {line: 2, character: 4}
active: {line: 2, character: 4}
marks: {}
finalState:
documentContents: |-
(
(aaa)
(#! @aaa)
)
selections:
- anchor: {line: 2, character: 6}
active: {line: 2, character: 6}
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}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
languageId: scm
command:
version: 5
spokenForm: clear every argue
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: everyScope
scopeType: {type: argumentOrParameter}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
(
(aaa)
(#bbb! @aaa "ccc")
)
selections:
- anchor: {line: 2, character: 4}
active: {line: 2, character: 4}
marks: {}
finalState:
documentContents: |-
(
(aaa)
(#bbb! )
)
selections:
- anchor: {line: 2, character: 11}
active: {line: 2, character: 11}
- anchor: {line: 2, character: 12}
active: {line: 2, character: 12}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
languageId: scm
command:
version: 5
spokenForm: clear every call
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: everyScope
scopeType: {type: functionCall}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
(
(aaa)
(#bbb! @aaa)
(#ccc! @aaa)
)
selections:
- anchor: {line: 1, character: 4}
active: {line: 1, character: 4}
marks: {}
finalState:
documentContents: |-
(
(aaa)
)
selections:
- anchor: {line: 2, character: 4}
active: {line: 2, character: 4}
- anchor: {line: 3, character: 4}
active: {line: 3, character: 4}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
languageId: scm
command:
version: 5
spokenForm: clear every callee
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: everyScope
scopeType: {type: functionCallee}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
(
(aaa)
(#bbb! @aaa)
(#ccc! @aaa)
)
selections:
- anchor: {line: 1, character: 4}
active: {line: 1, character: 4}
marks: {}
finalState:
documentContents: |-
(
(aaa)
(#! @aaa)
(#! @aaa)
)
selections:
- anchor: {line: 2, character: 6}
active: {line: 2, character: 6}
- anchor: {line: 3, character: 6}
active: {line: 3, character: 6}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
languageId: scm
command:
version: 5
spokenForm: clear every entry
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: everyScope
scopeType: {type: collectionItem}
usePrePhraseSnapshot: true
initialState:
documentContents: "[(aaa) (bbb)]"
selections:
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
marks: {}
finalState:
documentContents: "[ ]"
selections:
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
- anchor: {line: 0, character: 2}
active: {line: 0, character: 2}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
languageId: scm
command:
version: 5
spokenForm: clear every entry
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: everyScope
scopeType: {type: collectionItem}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
(
[(aaa) (bbb)]
(ccc)
)
selections:
- anchor: {line: 1, character: 4}
active: {line: 1, character: 4}
marks: {}
finalState:
documentContents: |-
(
)
selections:
- anchor: {line: 1, character: 4}
active: {line: 1, character: 4}
- anchor: {line: 2, character: 4}
active: {line: 2, character: 4}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
languageId: scm
command:
version: 5
spokenForm: clear every entry
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: everyScope
scopeType: {type: collectionItem}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
(ddd
[(aaa) (bbb)]
(ccc)
)
selections:
- anchor: {line: 0, character: 1}
active: {line: 0, character: 1}
marks: {}
finalState:
documentContents: |-
(ddd
)
selections:
- anchor: {line: 1, character: 4}
active: {line: 1, character: 4}
- anchor: {line: 2, character: 4}
active: {line: 2, character: 4}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
languageId: scm
command:
version: 5
spokenForm: clear every name
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: everyScope
scopeType: {type: name}
usePrePhraseSnapshot: true
initialState:
documentContents: (aaa) @bbb @ccc
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
marks: {}
finalState:
documentContents: "(aaa) "
selections:
- anchor: {line: 0, character: 6}
active: {line: 0, character: 6}
- anchor: {line: 0, character: 7}
active: {line: 0, character: 7}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
languageId: scm
command:
version: 5
spokenForm: clear every name
action: {name: clearAndSetSelection}
targets:
- type: primitive
modifiers:
- type: everyScope
scopeType: {type: name}
usePrePhraseSnapshot: true
initialState:
documentContents: "[(aaa) (bbb)] @ccc @ddd"
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
marks: {}
finalState:
documentContents: "[(aaa) (bbb)] "
selections:
- anchor: {line: 0, character: 14}
active: {line: 0, character: 14}
- anchor: {line: 0, character: 15}
active: {line: 0, character: 15}
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}
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}
Loading

0 comments on commit db358bb

Please sign in to comment.