Fork me on GitHub

has the error formatting in the REPL window changed in the latest cursive? it has pretty colors and nicely indented now.


or is this the consequence of something else customizing the exception reporting format?


That looks like Aviso pretty to me. Cursive will use it if you have it installed and loaded.


How exactly can this be used? I tried putting pretty on the classpath, then doing

(throw (ex-info "foo" {:bar 1} (Exception.)))
but not getting this nicer display


i ran ((requiring-resolve 'io.aviso.repl/install-pretty-exceptions)) - as mentioned here: - and then both (clojure.repl/pst) and the Print Last Exception Cursive action is printing nicely.


ooh so it isn't as simple as putting it on the classpath


for me it was pulled in by midje, through nubank/matcher-combinators, because i forgot to exclude midje:

{nubank/matcher-combinators {:mvn/version "3.3.1"
                                :exclusions  [midje/midje]}
like this


well, mr fleming did say: if u have it installed and loaded


yeah, I wasn't familiar with this lib at all


i saw it ages ago, probably in , but since it was pulling in a lot of deps, i ignored it, because cursive was already enhancing exception printing since then machines got more ram and more powerful cpus, so maybe it's not such a bad idea anymore to use this by default :)


Yeah, the namespace has to be loaded, since there’s no simple way to check if something is available on the classpath or not.


Cursive will also use clj-stacktrace if it’s loaded.


i think these would be great selling points for Cursive. i would worth mentioning them on the website and include screenshots too. it could definitely help me to win some ppl over to Cursive.


Sounds good, I will do.


Just out of curiosity, wouldn't requiring-resolve be a simple enough way to chexk?


The problem is that if it's not on the classpath, then it'll search it every time an exception is printed. Perhaps that's not a big deal, but I assumed anyone wanting to use it would have loaded it somewhere.


there must be some caching going on in requiring-resolve, because subsequent calls take almost no time:

(time (requiring-resolve 'io.aviso.repl/install-pretty-exceptions))
"Elapsed time: 157.880319 msecs"
=> #'io.aviso.repl/install-pretty-exceptions
(time (requiring-resolve 'io.aviso.repl/install-pretty-exceptions))
"Elapsed time: 0.037877 msecs"
=> #'io.aviso.repl/install-pretty-exceptions
(time (requiring-resolve 'io.aviso.repl/install-pretty-exceptions))
"Elapsed time: 0.032688 msecs"
=> #'io.aviso.repl/install-pretty-exceptions


Right, but that's if it's present on the classpath. I’m not sure how long that would take if it had to search for it but couldn't find it each time.

👍 1

@cfleming You typically get negative feedback, so here is a positive one 🙂 I'm using 1.12.0-eap1-2021.3 on macOS Big Sur for 2 days now and I have no issues so far. I don't use yet though. Everything feels smoother and snappier on this latest IntelliJ EAP release compared to the latest non-EAP one. I really love the new map formatting logic too! We are one step closer to a uniform Emacs and Cursive code formatting experience!

💯 7

Great, thanks - I also love positive feedback 🙂 Great to hear it’s going well. I’m going to look more in-depth at formatting soon, that’s some of the oldest code in Cursive and it could do with a dust-off. As part of that I’m going to make cljfmt compatibility a priority.

❤️ 2
🙌 2

people usually only give feedback when something's wrong I guess, well let me also say I'm delighted with Cursive & been using it since the start, good job @cfleming

👆 1
Ivar Refsdal10:11:20

I also totally dig Cursive! Great job @cfleming !


Thanks everyone!


hey people - I'm trying to setup clj-kondo via the LSP method, but I don't seem to be able to see the reported issues from kondo in the IDE - what am I missing? hovering shows either the previously setup static issue, or documentation.

👀 1

ie, I don't see the linting feedback. maybe this is better for #clj-kondo too 🙂


answering my own question - the IDE was configured to not show errors, I had to go and change the options in the top right:


BTW have you tried the LSP plugin with clojure-lsp? :)


but clojure-lsp is excellent, and i've used that with emacs very succesfully (ty for that btw, eric!)


Cool, you are welcome!

Otto Nascarella18:10:32

hey @UKFSJSM38… I have tried it yesterday, but the intellij lsp plugin dies quite quickly. if I try and use clj-kondo command line, it also dies. it needs to be the special server build provided by @U04V15CAJ


hmm, the difference is binary vs JVM there?


what do you mean by "it dies", can you give some example output?

Otto Nascarella18:10:52

it times out. even if I give it 60s to start


but you say on the command line it also dies?

Otto Nascarella18:10:25

no, no! sorry for the misunderstanding. it does not work in integration with the LSP plugin. even the normal standalone jar does not talk nicely to it. it needs to be the clj-kondo-lsp-server one


the first time clojure-lsp starts, it can take one minute or 2 depending on the project


the next times it caches

Otto Nascarella18:10:02

I’ll give it a huge bump and see…

Otto Nascarella18:10:01

> even the normal standalone jar does not talk nicely to it I mean… the lsp plug in does not talk nicely to lsp 🙂

Otto Nascarella19:10:50

although that message showed up, now it’s green @UKFSJSM38 and the highlighting I was getting from clj-kondo are also working ✌️


that message means lein classpath or clojure -Spath failed, it depends of your project type