Skip to content

"break" action doesn't use correct indentation #2212

Open
@pokey

Description

@pokey

Our new "break" action for splitting lines doesn't properly indent, because it doesn't use the LSP. For example, in the following talonscript:

aaa: bbb

Saying "break bat" results in

aaa:
bbb

instead of the desired

aaa:
    bbb

We should prob implement this similar to how we implement "pour": just go to the spot, press enter, and move away. Though I'm not sure that's possible extension-side? Might need to do it from Talon.

And tbh it's not uncommon that I want to leave my cursor there anyway. I've gone back to my old implementation for now:

break <user.cursorless_target>:
    user.cursorless_command("setSelectionBefore", cursorless_target)
    user.vscode("hideSuggestWidget")
    key("enter")

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions