This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-01-15
Channels
- # announcements (5)
- # architecture (17)
- # aws (2)
- # bangalore-clj (1)
- # beginners (157)
- # boot (22)
- # boot-dev (2)
- # cider (64)
- # clara (2)
- # cljs-dev (3)
- # clojure (30)
- # clojure-art (2)
- # clojure-australia (1)
- # clojure-belgium (1)
- # clojure-denver (1)
- # clojure-dusseldorf (1)
- # clojure-europe (8)
- # clojure-finland (2)
- # clojure-italy (9)
- # clojure-nl (21)
- # clojure-spec (261)
- # clojure-switzerland (3)
- # clojure-uk (67)
- # clojurescript (57)
- # clojurewerkz (2)
- # cursive (3)
- # datomic (27)
- # emacs (12)
- # figwheel-main (2)
- # fulcro (48)
- # garden (67)
- # graphql (41)
- # jobs (8)
- # kaocha (8)
- # liberator (2)
- # lumo (1)
- # off-topic (19)
- # parinfer (9)
- # perun (4)
- # re-frame (50)
- # reagent (7)
- # remote-jobs (4)
- # ring-swagger (20)
- # rum (6)
- # shadow-cljs (170)
- # specter (3)
- # tools-deps (19)
- # vim (3)
@bozhidar FYI: moved cider-nrepl
dependency from 0.20.0-SNAPSHOT
to 0.20.0
. All good here. (`deps.edn` + shadow-cljs
project, by the way)
And yeah - CIDER 0.20 is out! (https://metaredux.com/posts/2019/01/15/cider-oslo.html) Enjoy!
@bozhidar does the new pretty printing use the same API as cider did? Or do I need to send a patch to fireplace?
The API is documented here https://nrepl.org/nrepl/design/middleware.html#_pretty_printing
Basically now it’s printer
instead of pprint-fn
and print-options
instead of individual keys for *print-length*
and so on.
The print options are specific to the printer that’s being used. CIDER doesn’t set any by default and assumes the users know how to configure their favourite print engine.
Also - the old middleware returned a special response, now we’re directly pretty-printing the :value
key, which simplifies a lot dealing with pretty-printed values.
The old keys are simply ignored, although we can also have the middleware just translate them.
Ah, I just remembered why I didn’t do it - the old API assumed printing to a stream, the new assumed printing to a string.
Is there a browse spec at point
to show documentation of a keyword’s spec that is under the cursor?
@bozhidar I suppose cider doesn't bring along any pprinters, so if you want to use zprint, you will need to add it (and potentially mr. anderson it) yourself.
@dominicm I added it as a dependency on my project and configured cider-pprint-fn
in .dir-locals.el
.
@manuel that doesn't work if you want your printer to work in multiple projects. I generally try to prevent personal choices, like the printer, ending up in project specific configuration.
I also don't have the option for a dir locals, as vim doesn't have a practical equivalent. Especially not one that a plug in would depend on for a setting to be useful.
Also, if those dependencies ever conflict with those of your project, things will break. This is why cider inlines dependencies.
when cider connects to deps projects (jack-in), how do I tell it to use the :dev
profile? is this the best way? (setq cider-clojure-cli-global-options "-A:dev")
oh maybe .dir-locals
is the answer to that?
Yeah I’m using .dir-locals @stathissideris — or used to, I’m now starting my nrepl in a terminal and have CIDER connect to it. Saves me the bother 🙂
@orestis thanks, I just tried dir-locals and they work as expected!
Last night I discovered a conflict between figwheel-sidecar vs CIDER, because of conflicting nrepl vs tools.nrepl dependencies. Does combining figwheel-sidecar & CIDER probably require me submit a pull request to figwheel-sidecar that somehow removes the tools.nrepl dependency?
Ah, I've been using 0.5.16. (More context: https://gist.github.com/tjg/43527df81a0dd293a808aea10cf4ccc3#problem)
Yowza, that did the trick perfectly! Thanks @dpsutton! (Could've sworn I looked at figwheel-sidecar's sourcecode on the proper branch, but guess I missed something)
> @bozhidar I suppose cider doesn’t bring along any pprinters, so if you want to use zprint, you will need to add it (and potentially mr. anderson it) yourself.
@dominicm It actually brings three in the cider.pprint
namespace, but I hope this is going to be a temporary measure.
Puget would work as a normal dep, as it has a function to print to string, but for clojure.pprint
and fipp I had to write simple wrappers to easy the lives of the end users.
is there a quick way to search for and jump to a symbol definition across a project, either with, I guess, cider or emacs?
I have now! thanks! works perfectly... didn't realize it would go across files.
When using cider with lein, when I do cider-jack-in
it'll use the :repl
profile where I can add extra deps and stuff. How do I accomplish the same with deps.edn
?
((nil
(cider-clojure-cli-global-options . "-A:fig")))
@madstap i think this is what you are looking forIf I've already got a .dir-locals.el
containing
((nil . ((cider-refresh-before-fn . "integrant.repl/suspend")
(cider-refresh-after-fn . "integrant.repl/resume"))))
I'd add that like this?
((nil . ((cider-refresh-before-fn . "integrant.repl/suspend")
(cider-refresh-after-fn . "integrant.repl/resume")
(cider-clojure-cli-global-options . "-A:fig"))))
Yeah, I need to go through some tutorials so I can start reasoning about this stuff instead of cargo culting everything. Thanks a lot for the help 🙂
well, dang. I just discovered hydra-cljr-project-menu/cljr-add-project-dependency ... is this a viable alternative to alembic?
at the very least, it seems like it will conveniently add a dependency to my project.clj, which is great. the hot reload ('hd') from the minibuffer menu produces a java 10 related error, but plunging on.
trying new libraries during exploratory coding has required a lot of web-search->clojars->project.clj-updating->repl-restarting which is a flow breaker, so trying faster routes.
alembic has been handy, but seems at times to fail more often than I'd like, which is a flow disrupter as well.
this is so enticing: https://github.com/clojure-emacs/clj-refactor.el/wiki/cljr-add-project-dependency
but getting: "error in process filter: Temporarily disabled until a solution for java 10 is found."
also, the fuzzy finding of libraries isn't working.
it looks like I need to update clj-refactor.
or not. bummer, hot reload doesn't work to enable java 10 (which I do not have installed). do any of you have a dependency install/hot-reloading strategy?