Fork me on GitHub
#calva
<
2024-06-07
>
seancorfield20:06:41

Is there a reason there are options to auto-open the jack-in terminal and the REPL window but not the output terminal?

pez05:06:41

Only reason is that auto-opening a terminal means hiding another terminal. I didn’t know how to solve that in a backwards compatible way.

seancorfield06:06:50

So you could either open the jack in terminal or the output terminal? I tend to drag the output terminal to the top-right and the jack in terminal to the bottom-right (and not have any terminals "below"). There's no way to force terminals to open that way (like editors), right?

pez06:06:56

The mechanism involved is that of a reveal rather than opening. There may be some way to force the split, but I somehow doubt it.

chromalchemy19:06:53

Could you do a runCommands script to jack-in, wait, then move terminals. I do this to at least jack in with the output terminal “moved to tabs”

seancorfield23:06:40

Probably. It's a matter of how much effort I want to put into avoiding the other effort:grin:

pez09:06:20

Can you share your runCommands snippet for this, @U09D96P9B?

chromalchemy16:06:51

Here is my Talon voice script (witch is run outside vscode)

user.vscode("calva.jackIn")
sleep(2000ms)
user.vscode("calva.showOutputTerminal")
sleep(300ms)
user.vscode("workbench.action.terminal.moveToEditor")
sleep(200ms)
user.vscode("workbench.action.moveEditorToRightGroup")
sleep(200ms)
user.vscode("workbench.action.closePanel")

chromalchemy16:06:48

so in vscode runCommands would be something like this

{
    "command": "jackInWithOutputTab",
    "key":  whatever keybinding
    "args": {
        "commands": [
        // commands to run in sequence
        "calva.jackIn",
        "calva.showOutputTerminal",
        "workbench.action.terminal.moveToEditor",
        "workbench.action.moveEditorToRightGroup",
        "workbench.action.closePanel"
        ]
    }
}

chromalchemy16:06:53

But I don’t know with that internal mechanism in vscode would be to insert necessary timeouts between those actions.

chromalchemy16:06:05

I agree it would be nice to have this built in

pez16:06:51

As long as the commands return the promises properly, runCommand will not run the next command before the previous one is done.

chromalchemy16:06:02

Interesting. They were necessary for me because was joining those commands outside runCommands

pez16:06:14

The preferences for how things should be arrange vary between every coder, so I don’t know how to make anything of it built in.

pez16:06:34

Maybe Talon has a way to let you use the promises?

chromalchemy16:06:41

Yeah, probably. That is the declarative syntax, but you can use python also. Or in this case, it’s executing through some vscode extension js via rpc.

chromalchemy16:06:05

Might need more involved actions to find and arrange multiple terminals (by name?)