Cursive 1.13.2

28 views
Skip to first unread message

Cursive

unread,
Apr 4, 2024, 5:33:23 PMApr 4
to cur...@googlegroups.com

Hi everyone,

Cursive 1.13.2 is out! This release adds support for the new 2024.1 EAP, adds some new features and fixes lots of bugs.

First up, the new features. For remote REPLs, you can now also choose to get both the host and the port from a URL file, instead of just the port. This is useful if you want to connect to a machine which has been spun up in a cloud service, for example. Just use standard URI syntax, for example repl://1.2.3.4:8000, the scheme is ignored. Standard nrepl URLs will work there too.

There are now code annotations by vars showing how many reference to those vars there are. Like the Java implementation, this is a best-effort annotation. What that means is that vars with names that are very common appear in lots of places, and that makes the search very expensive for a (semi-)real-time annotation and they won't be annotated. There was a bug previously which made this extremely conservative for Clojure, so it should work better now, but it's still noticeable for vars with names which are words which appear frequently (so names like action, project and module in the Cursive source, for example). This means that this is generally useful for finding unused vars, but some will be missed if they have very common names. If an annotation appears, it should be accurate, though.

This release also contains support for the new syntax in Clojure 1.12.0-alpha7, as well as various fixes to related areas of the in-editor type inference. However, the latest Clojure Deref signalled that the syntax is likely to change again, so this fix is looking like it will be obsolete in the end.

There was also a bug in project resolution when using new versions of Leiningen, 2.11 and greater. This caused a cascade of problems due to conflicts with classes from the Maven resolver published by the IntelliJ platform. I've fixed this, but unfortunately the changes have meant that Cursive 1.13.2 now requires Leiningen 2.11 at a minimum.

Recently, I changed the new namespace dialog to pre-fill the namespace prefix based on the location of the new file in the filesystem. While this was a nice change, that text was always selected by default, which was a pain - it was easy to delete it by accident. This is fixed in this release.

Cursive has long had an option to fold stack trace lines from outside the current project. However, as JetBrains get stricter on not calling slow operations like index access from the EDT, this has become more and more difficult. So Cursive will now just do what other language plugins do, only folding lines from the language itself (clojure.*). Currently, this change only affects run consoles, so things like running tests and Clojure scripts, but this will soon apply to the REPL too.

In 2024.1, the APIs and the indexing system for Maven repositories have also changed in IntelliJ. This means that there will no longer be reminders to update those indices, but it all seems a little flakey still. The good news is that there is now really fast completion of artefacts that you already have in your Maven local repo, which means that your commonly used libs will always be available.

There are also some other fixes, detailed in the issues:

Added

  • Add support for new language syntax in Clojure 1.12 #2878
  • Add support for IntelliJ 2024.1 EAP #2871
  • Code vision for references #2741
  • Add Programmatic Setting of Remote REPL Host #2559

Changed

  • Simplify folding #2890
  • Update Maven completion code in 2024.1 #2889
  • Improvements to usages inlay hints #2883
  • Don't select namespace text when creating a new namespace #2881
  • Use built-in action for showing type information #2877

Fixed

  • Error resolving dependencies with Leiningen 2.11 #2879
  • When importing deps projects, Maven repos are no longer detected #2873
  • .deps.clj/1.11.1.1429/ClojureTools/TRANSACTION_START (No such file or directory) error on start #2867
  • Cursive ide makes intellij freeze and ruins project when running test #2752
  • Type inference does not work correctly for Class objects #2422
  • Incorrect type inference for anonymous functions #1278

Cheers,
Colin

Reply all
Reply to author
Forward
0 new messages