Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cider-connect-cljs: make server, port and build configurable #2563

Open
manuel-uberti opened this issue Jan 9, 2019 · 10 comments
Open

cider-connect-cljs: make server, port and build configurable #2563

manuel-uberti opened this issue Jan 9, 2019 · 10 comments
Labels
good first issue A simple tasks suitable for first-time contributors

Comments

@manuel-uberti
Copy link
Contributor

manuel-uberti commented Jan 9, 2019

Request

When I use cider-connect-cljs to connect to a shadow-cljs nREPL server, I always need to manually select the server, the port and the build, which for a project have always the same values every time.

Possible solution

It'd be nice if I can set the default server, port and build in .dir-locals.el, just as I do for the CLJS REPL type with cider-default-cljs-repl for instance.

Current alternative

As of now, I just do it manually. It's not a blocking issue, of course, it's just something to speed up the initial setup of the environment.

@bbatsov
Copy link
Member

bbatsov commented Jan 9, 2019

I guess we can have just some default server and port settings for all connect commands, not just the cljs connect.

@manuel-uberti
Copy link
Contributor Author

That would be even better, of course. 👍

@bbatsov
Copy link
Member

bbatsov commented Jan 9, 2019

Thinking a bit more about this it should probably be a default endpoint or something like this, as we currently do. Have you seen cider-known-endpoints? I guess adding there your host is a decent workaround for now.

@manuel-uberti
Copy link
Contributor Author

Thanks, didn't know about cider-known-endpoints.

It works fine, although I still have to select the endpoint and the build before having a working CLJS REPL. But it's a good workaround, thank you!

@vspinu
Copy link
Contributor

vspinu commented Jan 12, 2019

although I still have to select the endpoint and the build

If you set it in .dir-locals to one option it basically comes to pressing RET, RET, which is not a big deal I would guess.

One solution without adding an extra config would be to allow cider-known-endpoints to be one endpoint (not a list of endpoints). In such a case it could be interpreted as the endpoint and no query performed.

@manuel-uberti
Copy link
Contributor Author

I am already setting cider-known-endpoints in .dir-locals.el, but still Host: is a list of candidates, and I have to input the name of endpoint before hitting RET.

@vspinu
Copy link
Contributor

vspinu commented Jan 12, 2019

The default should be most recently used endpoint. I guess it depends on the completion framework that you use. It works correctly for me with IDO.

@manuel-uberti
Copy link
Contributor Author

I am on ivy, I'll check my settings.

@bbatsov
Copy link
Member

bbatsov commented Jan 13, 2019

I still think that adding a default endpoint is kind of orthogonal to the known endpoints (and in line with other config options with have). Even if you have one candidate but you have to select it all the time it can get somewhat annoying.

@stale
Copy link

stale bot commented May 8, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution and understanding!

@stale stale bot added the stale label May 8, 2019
@bbatsov bbatsov added the good first issue A simple tasks suitable for first-time contributors label May 12, 2019
@stale stale bot removed the stale label May 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue A simple tasks suitable for first-time contributors
Projects
None yet
Development

No branches or pull requests

3 participants