This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-10-27
Channels
- # announcements (13)
- # asami (12)
- # babashka (65)
- # beginners (62)
- # calva (14)
- # cider (8)
- # clara (11)
- # clj-kondo (16)
- # clojure (86)
- # clojure-europe (12)
- # clojure-gamedev (4)
- # clojure-nl (2)
- # clojure-sg (4)
- # clojure-uk (5)
- # clojurescript (206)
- # clojureverse-ops (11)
- # community-development (7)
- # conjure (12)
- # core-async (2)
- # core-logic (13)
- # cursive (49)
- # datalevin (1)
- # datomic (30)
- # deps-new (3)
- # duct (8)
- # events (5)
- # fulcro (10)
- # helix (5)
- # jobs (1)
- # klipse (5)
- # lsp (178)
- # luminus (1)
- # malli (8)
- # meander (3)
- # membrane (13)
- # missionary (1)
- # nrepl (5)
- # other-languages (4)
- # pedestal (4)
- # reitit (3)
- # releases (1)
- # reveal (27)
- # shadow-cljs (89)
- # tools-build (6)
- # tools-deps (11)
- # vim (2)
- # xtdb (64)
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.)))
(pst)
but not getting this nicer displayi ran ((requiring-resolve 'io.aviso.repl/install-pretty-exceptions))
- as mentioned here: https://ioavisopretty.readthedocs.io/en/latest/exceptions.html#io-aviso-repl - and then both (clojure.repl/pst)
and the Print Last Exception
Cursive action is printing nicely.
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 thisi saw it ages ago, probably in https://github.com/bhauman/rebel-readline , 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.
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.
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.
@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 tools.build 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!
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.
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
I also totally dig Cursive! Great job @cfleming !
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.
answering my own question - the IDE was configured to not show errors, I had to go and change the options in the top right:
but clojure-lsp is excellent, and i've used that with emacs very succesfully (ty for that btw, eric!)
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
it seems so, @U04V15CAJ
it times out. even if I give it 60s to start
@U5B8QSSC9 did you try increasing the plugin timeout? https://clojure-lsp.io/clients/#intellij
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
I’ll give it a huge bump and see…
> even the normal standalone jar does not talk nicely to it I mean… the lsp plug in does not talk nicely to lsp 🙂
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
check clojure-lsp log for more details https://clojure-lsp.io/troubleshooting/#server-log