calva

jasalt 2025-03-30T11:36:24.031129Z

Hi, I'm working on nREPL server for Phel (Clojure-like for PHP) and got Calva working on primitive level. Phel nREPL server implementation is kinda interesting as it uses async co-routines/fibers which is quite recent addition to standard PHP distribution (8.1+). https://github.com/jasalt/phel-nrepl

jasalt 2025-03-30T11:36:43.581579Z

While I'm primarily working with Emacs/Cider myself, I thought to note a couple oddities I noted with the "vanilla" Calva connection. - Startup command needs to be disabled/modified, that was solved with (setq cider-repl-init-code "") on Cider. - Answer probably in https://calva.io/customizing-jack-in-and-connect/ - Clojure standard lib is included in the completion quite aggressively which I didn't note with Cider. - Needs disabling somehow? These could be something that Phel VSCode extension should probably customize https://github.com/phel-lang/phel-vs-code-extension.

pez 2025-03-30T22:12:04.971649Z

Hi! Very cool with a new nrepl server!

pez 2025-03-30T22:12:58.173019Z

> Clojure standard lib is included in the completion Not sure what this means. Can you eleborate?

pez 2025-03-30T22:16:23.391929Z

Ah, I think I see it now. Thatโ€™s probably clojure-lsp. You may need to disable some things in its config. But you could start with confirming by stopping clojure-lsp. (Can be done via the button in the status bar, and other ways.)

pez 2025-03-30T22:20:33.827289Z

For the startup code, I think it is calva.autoEvaluateCode you need to update.

jasalt 2025-04-03T13:56:49.400259Z

@pez thank's, I'll check these.

maybenot 2025-03-30T05:13:41.356379Z

Let's say I added a library which provides custom clj-kondo hooks โ€“ I can see them in .clj-kondo/imports/...hooks/ What's the proper way to customize some of the rules provided?

pez 2025-03-30T22:11:23.387019Z

I think hacking on the provided config should work. Itโ€™s not Calva managing this so itโ€™s a bit opaque to me. Is it kondo downloading these, @borkdude?

borkdude 2025-03-30T22:12:58.095169Z

these configs are bundled with the dependency. if you don't agree with the config for a dependency you can either try to convince the author with an issue + PR or override the config / hooks in your own config

๐Ÿ™ 1
borkdude 2025-03-30T22:19:47.394559Z

here are some docs that might be helpful: https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md

borkdude 2025-03-30T22:20:19.758669Z

and https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#exporting-and-importing-configuration which is the mechanism of how the configurations are extracted from the dependencies

๐Ÿ™Œ 1
maybenot 2025-03-31T02:57:37.295709Z

What I did: placed a config.edn file inside .clj-kondo folder, copied a hook, modified it, and linked it from config.edn file Seems to be working! edit. kondo.edn -> config.edn

borkdude 2025-03-31T07:20:29.038749Z

Did you mean config.edn?

maybenot 2025-03-31T08:00:13.724019Z

Right, config.edn inside .clj-kondo

๐Ÿ‘ 1