Fork me on GitHub

Hello @cfleming, is Cursive currently supporting standalone scripts like Babashka’s? For some of the Java projects I work on, there are a few Babashka scripts. Since I’m using IntelliJ for these Java projects, I thought I could use Cursive for these scripts but currently various features like autocomplete and code formatting don’t work very well. If the answer to the previous question is no, do you have any future plan for this?


Have you tried adding a bb.edn file?


@U04V15CAJ Not yet, but is that a requirement? I would like to keep things simple if possible.


@U013F1Q1R7G Have you added Babashka as a facet to the module? Info on how to do that is here:


@cfleming Ah I was an idiot for not checking out cursive doc first. It works beautifully now. Thanks a lot 🙂

👍 2

I'm glad to know it works for non-Clojure modules, I can't remember if I tested that or not.


I can't think of any reason why it wouldn't, but it's good to know.


Just trying this out myself, is this expected to also cover pod support?


So, I'm not sure. I think pod deps are returned by bb when getting dependencies from bb.edn, but my knowledge of this is hazy.


It's fine, @U04V15CAJ says they are only repl visible symbols. I've not looked at the source, but I'm assuming that they’re dynamically generated.

Jakub Holý (HolyJak)18:06:43

I am constantly fighting with the formatting in Cursive which differs from my colleague's Emacs, namely I'd like:

 [myapp :as x] ; <--- [ below : not below 'r' as Cursive wants

"edge" ;; comment ; <---- no extra space between the sexp and comment (whether ;; or ;)
Any tips? 🙏 The first can be fixed by "One space list indent" but it sets that also for many other places, which is undesirable.


Here is the example how to enable cljstyle inn IDEA


But I prefer not use it from IDEA, just run in terminal bb format before commit.

Jakub Holý (HolyJak)22:06:25

Thank you. Our experience is that cljstyle doesn't manage to format some things the way we need (mainly custom macros) 😭


The comment problem can be fixed using Preferences | Editor | Code Style | Clojure | General | Comment alignment column - set that to 0.


I don't think the requires can be formatted as you want without doing it globally using "One space list indent", though.