Cursive 2025.1-eap3

Apr 12, 2025

Cursive 2025.1-eap3 is out. The first externally visible change in this release is that I'm switching to date-based versions, since Cursive is generally on a rolling update schedule and major version numbers don't really make a lot of sense. As before, the Cursive version (e.g. 2025.1-eap3) will come first, and then a shortened version of the IntelliJ version the build is for, e.g. 251 is for IntelliJ 2025.1 and 243 is for IntelliJ 2024.3.

The main new feature in this release is the ability to show HTML and SVG inline in the editor, which I think will unlock a lot of interesting use cases. Here's an example of inline SVG, credit to Timothy Pratley for the nice example:

This is triggered using tagged literals, like the previous inline renderers. If you evaluate a form like this:

(defn svg [offset]
  (let [circles (for [i (range 10 100 10)]
                  (let [hue (mod (+ offset (* (/ i 100) 360)) 360)  ; Map radius to hue (0-360)
                        color (str "hsl(" hue ", 100%, 50%)")]
                    (str "<circle r='" i "' stroke='" color "'/>")))]
    (str "<svg height='200' width='200'>"
         "<g transform='translate(100,100)' fill='none'>"
         (str/join circles)
         "</g>"
         "</svg>")))

(comment
  ; Evaluate this to see the SVG inline
  (tagged-literal 'cursive/html {:html  (svg 0)
                                 :title "SVG Circles"
                                 :key   "example"}))

You'll get Timothy's circles example from the screenshot above. Note that this doesn't require hiccup or anything else if you don't want it, but you can use it if you want to. For example, I use this now when designing the icons for Cursive, which are SVGs I create programmatically:

By default, the HTML/SVG is displayed inline, but if you'd rather open it in a new editor, you can add a :display :editor key, and it will be opened in a new editor instead. This can be useful if you want to open a large file, for example if you're using Clay, Clerk or something similar, or working on a website. If you're opening the file in a new editor you can also supply a :title "Some title" key which will be used as the title of the editor.

When you're working iteratively on some content like this, you often want to update the content in an existing editor or inlay. For this you can supply a :key "some-key" key, and if there is an existing display of that content it will be updated rather than opening a new copy.

I'll have full documentation and a demo video for this up soon.

Calva also released a similar feature recently, and to aid targeting both editors, Cursive will also accept Calva's #flare/html{} syntax in addition to #cursive/html{}.

I've also fixed a few bugs, and added support for automatically excluding some well-known directories for Clojure projects which shouldn't be considered part of the project. The list is customisable in the settings in the usual place under Settings | Languages & Frameworks | Clojure.

Here are the issues:

Added

  • Mark known clojure directories as excluded by default #2969

Fixed

  • Cannot load namespace into a build.clj REPL #3023
  • Problems resolving source path from library overridden in user deps.edn #3022
  • Error printing Java object #3021
  • Problems printing unreadable exceptions #3020

Cursive 1.14.1-eap2 Cursive 2025.1