This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-03-09
Channels
- # aleph (1)
- # announcements (4)
- # asami (6)
- # babashka (45)
- # beginners (19)
- # biff (3)
- # calva (35)
- # cider (4)
- # clojars (5)
- # clojure (117)
- # clojure-art (3)
- # clojure-denmark (2)
- # clojure-europe (89)
- # clojure-gamedev (5)
- # clojure-nl (4)
- # clojure-norway (17)
- # clojure-spec (3)
- # clojure-uk (5)
- # clojurescript (84)
- # conjure (13)
- # datomic (11)
- # emacs (2)
- # figwheel (2)
- # fulcro (16)
- # graphql (5)
- # honeysql (7)
- # introduce-yourself (1)
- # lsp (86)
- # malli (16)
- # music (1)
- # off-topic (2)
- # pathom (14)
- # polylith (28)
- # re-frame (11)
- # reagent (23)
- # releases (1)
- # reveal (19)
- # shadow-cljs (72)
- # spacemacs (13)
- # sql (1)
- # test-check (3)
- # timbre (4)
- # tools-deps (45)
- # vim (18)
251 errors remaining for strictNullChecks -- getting into some more difficult terrain, now

I've started having to guess at what the right way to handle things is. I'm at the point where I don't know enough about the code to guess right in some cases, I think. I may have to roll back a few of these commits, or a few of these changes.
maybe I should only do the things I'm certain of and then save the painful ones for smaller commits. this'll take forever 😬
Calva v2.0.253 just out. • Fix: https://github.com/BetterThanTomorrow/calva/pull/1585 • Fix: https://github.com/BetterThanTomorrow/calva/pull/1582 • Maintenance: https://github.com/BetterThanTomorrow/calva/pull/1568
I just came here to say I'm having issues with an unbalanced thing sending vs code into 100% CPU but loos like a bugfix has just been released!
Well given that the last instance was a few minutes ago, unless it just updated, maybe no. I'll let you know if it happens again.
I am now, but given it was released mere hours ago, it might have updated after I restarted VS Code or something.
Hmmm, I think it takes a VS Code window reload to upgrade Calva. It's not something that happens while you are working So maybe that means there are still problems in there.... Anyway, if it happens again, holler my way immediately, please.
Which is exactly what I did after it hung
Ah. So you could have been using 252 and then now you are using 253. Let's hope that was what happened!
I am setting cljfmt setting in .lsp/config.edn, but seems Calva is not reading it. What shall I set?
You can tell Calva to pick up the config from clojure-lsp. See https://calva.io/formatting/#configuration
> To provide the settings via clojure-lsp, set calva.fmt.configPath
to CLOJURE-LSP
(case sensitive).
If you don't have reasons to go via clojure-lsp for this, you can put the config in a separate file and configure the path to point at that file. If the file is in the project, you'll then benefit from hot-reloading of the config. There's a tip about that on the same docs page. You can then also use regular expressions without the #re
reader tag that clojure-lsp uses.
that should be enough AFAIK, you can debug if it's correct on the clojure-lsp side as a start
you can try Calva clojure-lsp server info
which brings all configs and double check your cljfmt setting is there
@UKFSJSM38 Yes, lsp can see it. Why does lsp need this information? Can lsp also format? Or lsp only relays this information for Calva to read?
LSP has formatting feature indeed: https://clojure-lsp.io/features/#format-a-whole-file-or-range
but Calva does its own formatting for some reason, what was done recently was to consider cljfmt settings from clojure-lsp
(IMHO I still think a flag to use clojure-lsp features instead of Calva formatting or NREPL would be better 😅 I think find-definition/references of clojure-lsp better than nrepl most of the time for example, sometimes I even stop REPL to use clojure-lsp navigation on calva)
Agree about that we need to solve the clojure-lsp/nrepl definitions conflict musch better. It is a completely separate issue than formatting though. Calva can't use clojure-lsp as a formatter, and it would be quite a lot of work to fix that, for no benefit (that I can see).
The CLOJURE_LSP option is there for projects where some use clojure-lsp formatting and then Calva users can share the config. If you do not have that situation, @UGC0NEP4Y, it is better to use a separate file.
Thanks. One good thing about a separate file might be it is easier to perform some style check on cicd.
Possibly. I don't know how that is done with a clojure-lsp-hosted config. At work we have duplicated configs. Maybe this is why.
there is a clojure-lsp option called cljfmt-path
where one could change the default .cljfmt.edn
to another path
I saw the config. However, it is not honored. The trailing ) is always formatted to the be close to the previous form.
Is it not working as described here? https://calva.io/rich-comments/#special-formatting