Fork me on GitHub
Cora (she/her)00:03:05

251 errors remaining for strictNullChecks -- getting into some more difficult terrain, now

metal 2
Cora (she/her)00:03:40

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.

Cora (she/her)00:03:00

maybe I should only do the things I'm certain of and then save the painful ones for smaller commits. this'll take forever 😬

👍 1

That’s probably a good idea ^. One step at a time! gratitude

Pepijn de Vos10:03:42

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!


Please let me know if the new version fixes it. 🙏

Pepijn de Vos10:03:41

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.


Are you using 2.0.253?

Pepijn de Vos10:03:33

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.

Pepijn de Vos11:03:59

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 > 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?


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).

👍 1

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.


Though clojure-lsp can be made to read a separate file too, I think.


there is a clojure-lsp option called cljfmt-path where one could change the default .cljfmt.edn to another path


Ah, that's what I was referring too. Will that allow for using regular expressions?


yes, the same which user can configure on .lsp/config.edn


I mean without using #re?


I saw the config. However, it is not honored. The trailing ) is always formatted to the be close to the previous form.


I’ve noticed this is not respected with format on save, though I’m not sure if that’s intended.


It's intended. We could update the description and the docs some to make that clearer.

👍 2