Fork me on GitHub
#clj-kondo
<
2023-10-04
>
Matthew Twomey15:10:43

Rather than using bash scripts, I’ve been using babashka scripts these days. I love this. I’ve noticed that kondo won’t kick on fully and provide completions, unless I have a bb.edn file along side my .bb script. That file just needs to contain an empty map and then kondo works fine (I think I read this requirement somewhere). My question is: Is there a way to force kondo to engaged from within emacs so that I don’t need to have that empty bb.edn file?

borkdude15:10:53

completions are provided by #CPABC1H61 (which in turn uses clj-kondo) and lsp is always project-based

borkdude15:10:29

which means that you will need a deps.edn or bb.edn in order for lsp to do anything

Matthew Twomey15:10:24

Ok.. I don’t love this, but I hear you. So if it were possible to do anything in this regard (so that I don’t need an accompanying empty bb.edn), that would be an lsp question?

borkdude15:10:46

I don't love it either, and yes, it's an lsp question :)

Matthew Twomey15:10:51

Ok - I’ll add my voice to that discussion as well.

hifumi12303:10:52

I dont use clojure-lsp, but I have ran into a similar annoying situation with Node Babashka, until I learned about cider-jack-in-universal . This allows me to spawn nbb from anywhere, even without an nbb.edn file, and I get a REPL + autocomplete for ClojureScript and Node.js code

hifumi12303:10:31

cider-jack-in-universal supports four different types of “projects”, without needing you to make a project file yourself: lein, deps.edn, nbb, and babashka I almost exclusively use it with nbb