This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-21
Channels
- # announcements (3)
- # aws (8)
- # babashka (14)
- # beginners (39)
- # biff (22)
- # cider (5)
- # clj-kondo (1)
- # cljs-dev (12)
- # cljsjs (4)
- # clojure (16)
- # clojure-europe (47)
- # clojure-germany (6)
- # clojure-uk (2)
- # clojurescript (36)
- # core-async (29)
- # cursive (19)
- # datalevin (14)
- # etaoin (10)
- # helix (1)
- # hyperfiddle (6)
- # introduce-yourself (5)
- # kaocha (43)
- # keechma (1)
- # lsp (7)
- # nbb (68)
- # new-channels (1)
- # off-topic (12)
- # pathom (11)
- # quil (14)
- # rdf (3)
- # re-frame (5)
- # reitit (6)
- # shadow-cljs (88)
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?
@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: https://cursive-ide.com/userguide/babashka.html.
@cfleming Ah I was an idiot for not checking out cursive doc first. It works beautifully now. Thanks a lot 🙂
I'm glad to know it works for non-Clojure modules, I can't remember if I tested that or not.
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.
I am constantly fighting with the formatting in Cursive which differs from my colleague's Emacs, namely I'd like:
(:require
[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.try to use cljstyle
https://github.com/greglook/cljstyle
here is my config for cljstyle
https://github.com/redstarssystems/apptemplate/blob/master/.cljstyle
Here is the example how to enable cljstyle
inn IDEA https://bogoyavlensky.com/blog/clojure-formatting-cljstyle/
But I prefer not use it from IDEA, just run in terminal bb format
before commit.
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.
Ok. Thank you!