Skip to content

Commit

Permalink
Added format action to compound edit command (talonhub#1635)
Browse files Browse the repository at this point in the history
`"camel format line"`
`"snake format token"`

Co-authored-by: Nicholas Riley <[email protected]>
  • Loading branch information
AndreasArvidsson and nriley authored Dec 14, 2024
1 parent 17af9d4 commit 2a65070
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion core/edit/edit_command_actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,14 @@ def edit_wrap_action(m) -> EditWrapAction:
return EditWrapAction(m.delimiter_pair)


@mod.capture(rule="<user.edit_simple_action> | <user.edit_wrap_action>")
@mod.capture(rule="<user.formatters> format")
def edit_format_action(m) -> EditFormatAction:
return EditFormatAction(m.formatters)


@mod.capture(
rule="<user.edit_simple_action> | <user.edit_wrap_action> | <user.edit_format_action>"
)
def edit_action(m) -> EditAction:
return m[0]

Expand Down

0 comments on commit 2a65070

Please sign in to comment.