Fork me on GitHub
#calva
<
2022-03-09
>
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
bringe03:03:14

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!

pez10:03:54

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.

pez10:03:51

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.

pez10:03:24

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

pez11:03:34

Ah. So you could have been using 252 and then now you are using 253. Let's hope that was what happened!

pinkfrog14:03:11

I am setting cljfmt setting in .lsp/config.edn, but seems Calva is not reading it. What shall I set?

pez14:03:12

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.

ericdallo14:03:13

that should be enough AFAIK, you can debug if it's correct on the clojure-lsp side as a start

ericdallo14:03:50

you can try Calva clojure-lsp server info which brings all configs and double check your cljfmt setting is there

pinkfrog15:03:46

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

ericdallo15:03:56

but Calva does its own formatting for some reason, what was done recently was to consider cljfmt settings from clojure-lsp

ericdallo15:03:16

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

pez15:03:49

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
pez15:03:21

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.

pinkfrog15:03:49

Thanks. One good thing about a separate file might be it is easier to perform some style check on cicd.

pez15:03:36

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.

pez15:03:41

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

ericdallo15:03:54

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

pez15:03:52

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

ericdallo15:03:57

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

pez15:03:55

I mean without using #re?

pinkfrog16:03:55

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

bringe17:03:30

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

pez17:03:04

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

👍 2