Fork me on GitHub
#cursive
<
2018-11-19
>
ro615:11:38

is there a way to configure the printer Cursive uses in the REPL?

ro619:11:57

can I teach Cursive to understand special syntax (eg string interpolation like "your email: '~{email}'" (https://cemerick.com/2009/12/04/string-interpolation-in-clojure/) so that the local (`email`) is still refactored correctly etc..?

cfleming21:11:45

@robert.mather.rmm No, you can’t configure the printer - what would you like to configure about it?

ro621:11:28

pretty printing by default

cfleming21:11:56

That should already happen, at least for nREPL type REPLs.

cfleming21:11:12

Are you using nREPL or clojure.main?

cfleming21:11:04

There’s no way to teach Cursive about the string interpolation at the moment, unfortunately. I’ll think about how that might be done, but it’s tricky.

ro621:11:47

I'm sure. Thanks for thinking about it. Somehow WebStorm makes it work with ES6 ${}

cfleming21:11:20

Right, they can do it there because it’s a language feature with a standard syntax.

cfleming21:11:38

Here it’s a macro that changes how strings in the macro body are interpreted.

cfleming21:11:53

I have an extension API for macros, but it doesn’t allow anything like that yet.

ro621:11:07

right, that makes sense

ro621:11:48

I'm on 'nREPL' btw. I think what happened is that a certain kinds of exceptions (compiler exceptions I guess?) didn't pretty print. Other things are though.

cfleming21:11:37

Ok, if you have examples of things that are not, I’ll look into why - they should be.

ro622:11:10

I think the repl history where I saw it is gone now. Are those kept in files somewhere?

wilkerlucio22:11:08

hello, I just tried to use some override-deps to point a dep to a git source, in the deps panel it shows the correct version (with the git sha), but in the External Libraries the version is still the one from maven, and when I navigate to the code it goes to the maven version, is this a bug?

wilkerlucio22:11:56

I expected it to navigate to the git and look references from it, but seems like it still relying on the maven

cfleming23:11:24

Does refreshing the project in the deps toolwindow help?

wilkerlucio23:11:12

nope, I tried a couple times

cfleming00:11:48

Ok, so the repro case is: have a maven dep, then switch to a git dep using override-deps? I’ll try that.

wilkerlucio12:11:37

yes, correct, in my case the maven dep is a second degree dep, that in my project I'm trying to override on a alias using an override dep

cfleming00:11:22

Ok, so you don’t explicitly depend on the one you’re overriding, it comes in transitively?

cfleming02:11:54

@U066U8JQJ I can’t reproduce this.

cfleming02:11:41

I have a project that looks like this:

{:deps {ring {:mvn/version "1.6.3"}}
 :aliases {:test {:override-deps 
                  {org.clojure/java.classpath 
                   {:git/url ""
                    :sha "bc8992ec34df03c4a33d8d17f7543d5711de6308"}}}}}

cfleming02:11:18

java.classpath is pulled in transitively, but it’s correctly replaced with a “Deps: org.clojure/java.classpath:bc89922” lib.

cfleming02:11:31

There is one thing which is strange - the git library isn’t shown in the External Libraries section at all.

cfleming02:11:58

Can you check File-&gt;Project structure, what I suspect is happening is that in your module with the override, it’s being overridden correctly but the git lib doesn’t show in External Libs. Then I suspect that the original Maven lib is still being pulled in from somewhere else in your project, which is why it does show up there.

wilkerlucio17:11:05

trying again now and it works, maybe been some cache issue :man-shrugging: