Fork me on GitHub
#cursive
<
2018-08-02
>
kenny00:08:58

Is there a way to disable the Run: window popping open every time I start a REPL?

genekim04:08:19

I love rainbow coloring of parens, but in Dark mode, the blue parens are almost impossible to see — is there a way to take out blue from the rainbow palette? Many thanks!!!

cfleming07:08:08

@genekim Yep, you can customise all the colours in Settings-&gt;Editor-&gt;Color Scheme-&gt;Clojure

genekim17:08:42

Awesome, @cfleming! Thank you! PS: on my laptop screen (12" MacBook), the dark blue is almost invisible. Surprised at how visible it is on a monitor.

cfleming22:08:56

Yeah, I only work on a monitor, but I also don’t use Darcula.

cfleming07:08:37

@kenny I’m going to fix that shortly. Which REPL type are you using?

gfredericks15:08:03

does cursive have any mitigation for the problem of jumping to the definition of a var that's defined by an unusual macro where the macro call doesn't actually mention the symbol?

gfredericks15:08:54

(or is that supposed to work already?)

Joe Lane16:08:37

Any way to know the current priority of https://github.com/cursive-ide/cursive/issues/2010 ? Is there a different workaround than putting my resources directory in my src directory?

kenny17:08:41

@joe.lane We currently store some configuration and that bug would break our whole workflow since most projects require that configuration. The configuration is stored in a project called config. If I start a REPL and try and slurp the config, as that issue shows, I also receive the IllegalArgumentException. However if I depend on the config project in my app project, I am able to slurp the config resource. Any resource within my app project still receives the IllegalArgumentException though.

kenny17:08:40

Running (System/getProperty "java.class.path") shows that the resources directory is not on the classpath.

kenny17:08:49

Looks like any path in :paths besides src is not included in the REPL classpath.

kenny17:08:41

Same applies for :extra-paths in an alias.

Joe Lane17:08:47

What do you mean “project called config” ? an intellij project or a cursive project?

kenny17:08:39

It's a Cursive Deps project.

chgraham18:08:11

Using the latest IntelliJ Community and Cursive plugin, I am getting the "symbol cannot be resolved" error. I have tried invalidating caches and restarting to no effect. In a require call I have [uncomplicate.neanderthal.vect-math :as vm :refer [exp! fmax fmax! linear-frac!] exp! cannot be resolved, but my own function that calls exp! compiles fine. linear-frac! (for example) can be resolved. Does anyone have a suggestion to solve this problem? [EDIT: ok, looking at the source code for the vect-math package, most of the entry points are defined using defmath or defmath! macros, and only the symbols of functions defined by defn are able to be resolved by Cursive/IntelliJ.]

potetm18:08:49

@cfleming That changed worked great. Thanks!

grav19:08:49

Using amazonica, I get code completion in the repl. But in the editor, everything is cannot be resolved. I know amazonica is using Java reflection. Is that related? How come it’s working in the repl, though?

onetom19:08:03

is there an easy / clean way to edit my ~/.clojure/deps.edn with Cursive? it wants to create a project around it... 😕

vuuvi19:08:51

does anyone use liberator with cursive? Any way to get defresource to be recognized as a valid macro?

justinlee20:08:37

@alexkeyes hitting alt-enter and marking its resolution doesn’t work?

vuuvi20:08:28

nope, because liberator uses the defresource macro in order to create endpoint resources for an API

vuuvi20:08:35

for whatever reason it doesn’t resolve

cfleming22:08:05

@gfredericks No, unfortunately. Is this an internal macro or one I can look at?

cfleming22:08:27

Sorry, reading from the top, didn’t see the later comment to ignore.

cfleming22:08:56

@joe.lane Deps stuff is currently being worked on actively, I’ll hopefully look at that one today.

Joe Lane17:08:44

A solution I found for this is to just mark the resources directory as a Resources Root in Intellij. Then it “Just Works” 🙂

cfleming22:08:19

@chgraham You may be able to make that work by resolving those macros as either def or defn, depending on what they look like. See here for some (slightly out of date) details: https://cursive-ide.com/userguide/macros.html

cfleming22:08:01

@potetm Awesome! Thanks for letting me know.

cfleming22:08:01

@grav Resolution in the REPL works differently to the editor, it actually introspects the running environment. But if you’re using Amazonica, you should be prompted to create stubs which will make the resolution work in the editor too.

kenny23:08:11

Would be cool if Cursive could detect if a REPL is running and, if one is, use that for editor resolution.

👍 4
cfleming22:08:18

@onetom Not really, but I’ll add it to the to-do list since that would be useful.

4
cfleming22:08:38

@alexkeyes You should hopefully be able to make that work using: https://cursive-ide.com/userguide/macros.html, depending on what that macro looks like.