Fork me on GitHub
#cursive
<
2019-11-12
>
flowthing08:11:22

Is there a way to start a tools.deps REPL from Cursive such that the alias definitions use -R:foo instead of -A:foo? I found this discussion from 2018 on the topic: https://clojurians-log.clojureverse.org/cursive/2018-10-04 I'm just wondering whether anything has changed since then, or whether there are plans to support it?

cfleming09:11:28

@flowthing There’s no way to do it right now, but I’m open to being persuaded that there should be. I’m not sure that the alias separation that deps allows is a good idea in general though and I’d prefer to keep things simple - what’s your use case?

flowthing09:11:18

All right — it's not a super-big deal for me since I can think of a couple of ways to work around it (running an nREPL server from the command line and connecting to it from Cursive or having :main-opts in separate aliases)... but my use case is that I have aliases like :test and :sass which have both :extra-depsand :main-opts, and when I start a REPL from Cursive, I just want the deps. Having separate aliases is OK, but it feels sort of weird to have these aliases that don't work by themselves — you need to couple them with the dep-declaring alias.

flowthing09:11:42

I wonder whether Cursive should ever take :main-opts in aliases into account when starting a REPL…?

cfleming09:11:18

Hmm, I’m not sure about that, I’d have to think about it.

flowthing09:11:56

One thought that occurred to me is that instead of (or in addition to) alias1,alias2, Cursive could allow just specying the full command line option that gets passed onto tools.deps (like -R:foo -A:bar) or something.

flowthing09:11:05

But I don't know how Cursive calls tools.deps, of course.

flowthing09:11:29

Also, I can see how that could be a source of weird errors.

cfleming09:11:40

Yes, I could probably do that, and for simplicity if only a bare alias is provided then that would be implicitly -A

flowthing09:11:53

Yes, that sounds good.

Janne Sauvala11:11:33

I was also checking a few days ago if Cursive can start a REPL with -A: and -R: options. My use case was using REBL with nREPL middleware (that sends evaluated forms also to REBL, https://github.com/RickMoynihan/nrebl.middleware).

Janne Sauvala12:11:48

In the end I just started a separate nREPL and connected to it with Cursive

borkdude09:11:40

Has anyone used LSP with IntelliJ before? It seems to "kinda work", but not completely: https://github.com/gtache/intellij-lsp/issues/118

cfleming19:11:24

@borkdude I haven’t tried it, no. In general the JetBrains guys have opted for not going down the LSP route. They decided against it in their Rust IDE, for example.

cfleming19:11:03

While it does have obvious advantages, they felt that it didn’t allow them to give the level of support they wanted.