Fork me on GitHub
#cursive
<
2020-06-10
>
adam01:06:05

Cursive doesn't recognize my functions once I rename them like this:

[myns.account.sign-in :refer [handler] :rename {handler sign-in-handler}]
Is this a known issue?

cfleming02:06:00

Yes, that’s https://github.com/cursive-ide/cursive/issues/394. I’ll see if I can look at that shortly.

👍 7
adam01:06:41

{handler sign-in-handler} shows in yellow and don't become clickable

hlship18:06:37

One thing I miss in Cursive is an intention for fully qualified names to create an :require entry (and let me customize the alias).

✔️ 8
💯 4
cfleming09:06:34

I’ve put this in the next release cycle so I’ll try to look at it soon.

8
pseud19:06:36

Hey. I seem to remember that you can somehow configure a repl via cursive such that some commands/forms are automatically evaluated on startup. The reason I ask I that I have to run (shadow.cljs.devtools.api/nrepl-select :app) when connecting to a remote clojure nREPL to get a cljs repl and I’d like to do this automatically.

👀 4
pseud20:06:39

The best I’ve been able to manage so far is to

shadow-cljs
  {:nrepl {:port 7002
           :init-ns cljs-user}
… and then have a (defn start [] …) function which I can run.

cfleming09:06:51

Yes, there’s no way to automatically send forms at startup with Cursive, although I’m planning to add that soon. You can use user.clj for some use cases, which is a Clojure thing. I’m not sure if that would work for what you need though.

8
Vachi20:06:22

hi everyone, not related to cursive itself but since we are all using intelliJ idea in this channel, it is possible to customize the font size for the named functions? like the picture

imre21:06:10

o_O

😂 3
imre21:06:44

Wow. While I don't know if that's possible, I wonder what benefit you think that would bring?

Vachi21:06:41

not sure, just saw this in twitter, but it looks that it highlights in which namespace you are and what functions it has at a glance.

imre21:06:28

you could use intellij's File structure action for that (under navigate if you want to go through the menu)

imre21:06:47

I have it bound to a chord and use it frequently

Vachi21:06:57

yeah, that's what I use most of the time ctrl+f12

cfleming09:06:59

I echo the “why?” sentiment, but AFAIK there’s no way to do this. I think IntelliJ requires lines of text to all use a single font size.

👍 3
polymeris23:06:05

Lately been noticing that when I hit ctrl-shift-T to create a new test ns it generates:

(ns my-ns-test
  (:require [clojure.test :refer :all])
  (:require [my-ns :refer :all]))
i.e. multiple requires. Not sure if that even works, but a single require would probably more idiomatic

cfleming09:06:26

That does look a little odd, but works fine. It’s controlled by a template at Preferences | Editor | File and Code Templates | Clojure Test Namespace so you can modify it, but you’re right, I should update that.

thanks2 8