Skip to content

Commit

Permalink
Added insertion delimiter to Talon command (#1789)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson authored Aug 15, 2023
1 parent 5a9be05 commit bee6ed7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
languageId: talon
command:
version: 6
spokenForm: clone command
action:
name: insertCopyAfter
target:
type: primitive
modifiers:
- type: containingScope
scopeType: {type: command}
usePrePhraseSnapshot: true
initialState:
documentContents: |-
foo:
"bar"
selections:
- anchor: {line: 0, character: 0}
active: {line: 0, character: 0}
marks: {}
finalState:
documentContents: |-
foo:
"bar"
foo:
"bar"
selections:
- anchor: {line: 2, character: 0}
active: {line: 2, character: 0}
9 changes: 6 additions & 3 deletions queries/talon.scm
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,12 @@

;;!! slap: key(enter)
;;! ^^^^^^^^^^^^^^^^
(command_declaration
right: (_) @_.interior
) @command
(
(command_declaration
right: (_) @_.interior
) @command
(#insertion-delimiter! @command "\n")
)

(source_file
(declarations) @command.iteration
Expand Down

0 comments on commit bee6ed7

Please sign in to comment.