calva

Wednesdays you might find @U0ETXRFEW in the Gather Calva space. Invite is https://gather.town/invite?token=GZqrm7CR and the password is `Be kind`.
pez 2021-02-19T07:57:13.472500Z

For anyone with some time to spare and a heart beating for the newcomers to Clojure or to Calva. https://11500-125431277-gh.circle-artifacts.com/0/tmp/artifacts/calva-2.0.173-814-connect-without-project-fa899f87.vsix) you can help me test. Here’s the relevant documentation page (outdated now, since I have changed my mind about some things while testing this, but still the spirit of the change should shine through). https://github.com/BetterThanTomorrow/calva/blob/814-connect-without-project/docs/site/getting-started.md

pez 2021-02-19T07:59:46.472700Z

For comments on the guides. I’m not sure how to collect those in an efficient way. For now, use this issue that @slack_clojurians started: https://github.com/BetterThanTomorrow/calva/issues/1039

ingesol 2021-02-19T08:34:24.476200Z

Hi! I'm migrating to calva these days, and so far it seems really nice. The one big disappointment so far has been code formatting, since cljfmt has issues with some variants of namespaced keywords: https://github.com/weavejester/cljfmt/issues/106. I know this is a problem that can only get fixed by people doing the job for free, se I'll just have to wait or do it myself. But my question is: Since I've heard so little about this, is the majority of clojure developers not using namespaced keywords in their codebases?

practicalli-john 2021-02-19T08:49:27.476400Z

I never used cljfmt in projects until the current project. There are some interesting formatting rules but some do not seem to fit my workflow. I think I disabled most of them in the end. I don't believe an effective workflow should be constrained by formatting. Cljfmt is an interesting project, although it's not the canonical way to format Clojure code (according to the cljfmt project readme).

ingesol 2021-02-19T08:52:11.476600Z

That's certainly true. But for 95% of my code layout, I fall back to just applying default formatting. It's particularly convenient for when you want the right side aligned in maps and lets. IMO that quickly gets out of sync if I don't auto format

ingesol 2021-02-19T08:52:25.476800Z

Do you not use auto formatting at all?

Stefan 2021-02-19T13:57:00.478600Z

I just posted this question in #reveal, but I’m not sure if it fits better over here, so I’m posting a link over here, hoping that someone recognizes my issue… https://clojurians.slack.com/archives/CUDTFQ152/p1613742962110400

practicalli-john 2021-02-19T15:03:40.479400Z

I do use auto-formatting, via Emacs. which I just starting with LSP and cljfmt. Calva is a much smoother experience, but I still have a lot to learn. Hope you find some good suggestions.

👍 1
pez 2021-02-19T15:08:24.479600Z

I think namespace keywords is very common. I think that it might be the namespace alias syntax that is problematic for the formatter, and maybe not as common. I think that the one who knows the current state of this as far as cljfmt is concerned might be @lee (because he knows stuff about rewrite-cljc). Then there is also that Calva uses an aging fork of cljfmt. There was work started to merge in latest, but it seems to have stopped. https://github.com/PEZ/cljfmt/pull/2

pez 2021-02-19T15:11:19.479900Z

I think it is with reach to make Calva use something like zprint for formatting (still would take a focused effort), but I also think it would run into the same problem. Since upstream it looks the same for both….

pez 2021-02-19T15:13:11.480100Z

Another option we have is to rely on Calva’s indenter as a backup. Then we wouldn’t get full formatting when we hit this problem, but at least get things indented. Of all options I see, this is the one with the least effort needed.

pez 2021-02-19T15:32:58.480300Z

Do you get the error also if you don’t use the middleware?

Stefan 2021-02-19T16:07:17.480500Z

No when I use the dep-only version from the calva doc then I don’t get these errors.

Stefan 2021-02-19T16:21:09.480700Z

I’m starting to suspect the Java version that I’m using. I’m using AdoptOpenJDK 8, and it seems with AdoptOpenJDK 11 it works better. I’ll test a bit more.

pez 2021-02-19T16:30:07.480900Z

There a keyboard shortcut for tapping. So maybe the deps-only option could work pretty well?

pez 2021-02-19T16:33:09.482300Z

Mostly curious. I haven’t quite figured out reveal myself, so have no idea how it is best used. 😃

lread 2021-02-19T16:33:34.482900Z

Hi folks! This issue will be addressed in rewrite-clj v1 which I am currently pushing toward an alpha release.

👍 3
🤘 1
pez 2021-02-19T16:37:43.483200Z

So, then maybe if I update my cljfmt fork and make it use rewrite-cljc we can let Calva users opt in on testing it that way.

lread 2021-02-19T16:41:11.485700Z

rewrite-cljc is dead, but is reborn in the clj-commons/rewrite-clj v1 branch (which when ready, will be merged to main)

pez 2021-02-19T17:09:05.486Z

Awesome. I’m not even sad that you killed my name for it. 😃

lread 2021-02-19T17:32:17.486200Z

Ha!