calva icon indicating copy to clipboard operation
calva copied to clipboard

AutoConnect setting?

Open davidyang opened this issue 3 years ago • 5 comments

I'm trying to create a REPL connect sequence where I don't have to hit enter on the localhost:port prompt. I see in the connect function that if isAutoConnect is true is set then it'll automatically connect, but I'm not sure where that is being set.

I tried setting "calva.autoConnect": true in preferences but that didn't seem to do it.

davidyang avatar Oct 23 '22 14:10 davidyang

There is currently no way to get rid of that step. We should maybe fix that.

Iirc, the autoConnect setting is about when Calva starts, if it should automatically connect to a running REPL.

PEZ avatar Oct 23 '22 16:10 PEZ

This would be much appreciated - right now I have 2-3 VSCode workspaces open for server, web, mobile and having a keyboard shortcut to quickly connect to their respective REPLs would be great.

I'm happy to work on adding a setting like autoConnect to ReplConnectSequence for the connect sequence and checking that in connect if you think that's the right approach.

davidyang avatar Oct 24 '22 15:10 davidyang

That would be awesome, @davidyang. I think autoConnect might be a bit misleading, if menuSelections are not configured. Not sure what a good name would be... Maybe we should make this the default behaviour and have a setting like alwaysPromptForNReplPort, which can be set to true to get the prompt?

@bpringe @corasaurus-hex @Cyrik (or anyone else), do you see any problem with not prompting for the port if one is found in the port file?

In any case, @davidyang, please go ahead with the PR. I think alwaysPromptForNReplPort is a good name regardless if we use true or false as the default.

PEZ avatar Oct 24 '22 22:10 PEZ

Sounds good to me. I've had a ticket for this on the books for ages 😄

Cyrik avatar Oct 25 '22 01:10 Cyrik

I don't know if there would be an issue with that, but if several people complain about the default, we can just flip it later. 😃

bpringe avatar Oct 25 '22 03:10 bpringe