lilactown / helix

A simple, easy to use library for React development in ClojureScript.
Eclipse Public License 2.0
624 stars 52 forks source link

Refine development setup #149

Closed vemv closed 10 months ago

vemv commented 10 months ago

Makes it easy to spin up a shadow-cljs dev server using a fixed shadow-cljs version (not easily shadowed by a global install), and cider-nrepl latest.

By using cider-nrepl 0.40.0, indentation issues are gone. (It didn't have to do with indentation inference, btw)

I found these tweaks handy for my own debugging, but they also look useful enough for contributors.

Cheers - V

vemv commented 10 months ago

Good feedback!

Apparently it's a bit complicated to add a setup where CIDER is fully configured but optional.

I'll close the PR as I don't have that much time in my hands.

You may want to salvage some bits.

Cheers - V

rome-user commented 10 months ago

@vemv Doesn't CIDER automatically add the cider-nrepl middleware? Emacs on my end produces

"-d nrepl/nrepl:1.0.0 -d cider/cider-nrepl:0.30.0 server"

As for refactor-nrepl, I think that is okay to explicitly add since its advertised as editor agnostic.

Maybe there is a way to set .dir-locals.el so that we add '(("refactor-nrepl/refactor-nrepl" "3.9.0")) as jack-in dependencies, then use a custom shadow-cljs command invoking npx shadow-cljs with the config merge option to add middlewares?

vemv commented 10 months ago

Doesn't CIDER automatically add the cider-nrepl middleware?

As mentioned, cider-jack-in and cider-connect are different use cases. For the latter, one needs an already-running nrepl server with the middleware configured in advance.

As for refactor-nrepl, I think that is okay to explicitly add since its advertised as editor agnostic.

(FYI, cider is, too)

Maybe there is a way to set .dir-locals.el so that we add '(("refactor-nrepl/refactor-nrepl" "3.9.0")) as jack-in dependencies, then use a custom shadow-cljs command invoking npx shadow-cljs with the config merge option to add middlewares?

Off-hand, I don't know, feel free to @ me in a PR!