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 94f718c
Show file tree
Hide file tree
Showing 40 changed files with 1,064 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,36 @@
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: |-
(
(_
(_) @dummy
(capture) @name @_.domain.end
) @_.domain.start
)
selections:
- anchor: {line: 2, character: 3}
active: {line: 2, character: 3}
marks: {}
finalState:
documentContents: |-
(
(_
) @_.domain.start
)
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,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,30 @@
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: |-
(anonymous_node
name: (_) @string @textFragment
)
selections:
- anchor: {line: 1, character: 2}
active: {line: 1, character: 2}
marks: {}
finalState:
documentContents: |-
(anonymous_node
name: (_)
)
selections:
- anchor: {line: 1, character: 12}
active: {line: 1, character: 12}
- anchor: {line: 1, character: 13}
active: {line: 1, character: 13}
Loading

0 comments on commit 94f718c

Please sign in to comment.