Fork me on GitHub
#cursive
<
2022-09-14
>
danm13:09:30

How do I tell Cursive that I want to start a REPL within the context of a specific alias? Like, the equivalent within a run configuration of clj -A:dev? Setting -A:dev under 'Parameters' gives:

Execution error (FileNotFoundException) at java.io.FileInputStream/open0 (FileInputStream.java:-2).
-A:dev (No such file or directory)
and then the REPL exits

danm13:09:16

Aah, I just had to tell it to use Run with Deps instead of Run with IntelliJ project classpath

imre13:09:08

I use the latter and tick the aliases I want in the deps tool window

imre13:09:46

followed by Refresh Clojure Deps Projects

danm14:09:54

I've got a deps.edn with an alias specified as:

:cider {:main-opts ["-e" "(require (quote griffin.user))" "-m" "nrepl.cmdline" "--middleware" ["cider.nrepl/cider-middleware"]]}
When I launch the REPL in a terminal via clj -M:cider it works fine. When I try and use IntelliJ run configurations to launch an nREPL run with deps and include cider as an alias, it bombs out with
nREPL middleware: --interactive has no namespace
Does anyone have any pointers as to where I even begin to debug that? o.0

imre15:09:10

Why do you need that alias?

danm15:09:29

Technically I only need the ["-e" "(require (quote griffin.user))"] bit of it, which I can put in another alias just fine. This is just curiosity. The :cider alias is for our team mates who are using Emacs (or Vim with the right plugins), but I thought all Cursive was doing was launching the REPL in the background with clj and connecting to it from an nREPL client, so I don't get why that alias would work on the CLI but not through a run config. It's just a bit of a faff to say "Emacs users need alias X, IntelliJ users need alias Y"

danm15:09:56

I Googled the error I got back, and got 0 results

danm15:09:28

I was at least expecting to see where it was generated on GitHub or similar...

imre15:09:02

yeah you certainly don't need cider for cursive

imre15:09:11

and I don't think ["-e" "(require (quote griffin.user))"] works in Cursive

danm15:09:38

Oh that does, definitely

imre15:09:53

oh does it?

imre15:09:58

that's new 🙂

imre15:09:16

at least to me

danm15:09:36

I do recall at one point trying to set up the cider middleware, but I forget why I wanted it now. There was one specific feature it offered that I thought was handy and it'd be good to try and get in the Cursive REPL

danm15:09:51

Can't have been that important if I forgot what it was 😉

imre15:09:09

I'd use 2 aliases and emacs people could use -M:startupcommand:cider and cursive just startupcommand

Cora (she/her)23:09:10

is there a way to show the file extension when searching for a file by filename in the project files panel?

eskos12:09:53

Which search are you referring to specifically? IDEA has a bazillion ways to slice the search ham 🙂

kwladyka13:09:07

I see extensions, can you upload a screenshoot what is missing for you?

Cora (she/her)13:09:51

where do you see the .clj file extension in that screenshot?

kwladyka13:09:46

oh you are right… lol. sorry

kwladyka13:09:01

I think I used to look on icons

Cora (she/her)13:09:07

haha I was genuinely confused

Cora (she/her)13:09:46

that's what i've had to do, too, but I really don't like it

kwladyka13:09:17

I can’t help. I have never tried to find a solution for this.

Cora (she/her)13:09:51

thanks for checking, though!

eskos13:09:19

I was slightly confused for a moment - I’ve rebound my cmd+shift+o to be actually the Namespaces search instead of Files. Namespaces shows file types in ambigous cases.

eskos13:09:12

The correct action to bind is in Settings > Keymap / Plugins > Cursive > Namespace... (and possibly also Main Menu > Navigate > Namespace...)

eskos14:09:29

Just to prove a point, I did this rebinding change some time ago when I was working on a project which had a certain preference to naming things and realized that the cmd+shift+o wasn’t doing the thing I assumed it should… 😅

Cora (she/her)14:09:41

I don't only search for clojure files though?

eskos14:09:00

Then the double-shift/“all” search would be more appropriate imo. It shows paths.

Cora (she/her)23:09:25

probably not a cursive question

Cora (she/her)23:09:55

I just have a hard time believing people don't need to see this