cursive

Roman Liutikov 2025-10-31T10:12:34.884019Z

This might be interesting for Cursive users A quick hack for Cursive to provide autocompletion for js libraries in clojurescript https://romanliutikov.com/blog/enabling-javascript-autocompletion-in-cursive-for-clojurescript

👀 2
🔥 1
2025-10-31T10:53:56.312279Z

This looks awesome! Is the format of the stubs file documented somewhere? I might investigate doing something similar for ClojureDart. Or I'll just look at the output of your utility if no readily available documentation.

Roman Liutikov 2025-10-31T10:57:13.665989Z

@andre.richards it just has to be a js file with flat structure, it's explained in the blog post too bad Cursive won't pick up type info from jsdoc, so that method calls on return types are picked up as well (.attr (d3/create) "width") ; <- attr is not resolved here so it's only relevant for top level functions/values in a library

Roman Liutikov 2025-10-31T10:58:45.465769Z

I don't know when and if ever Cursive will land better integration story with underlying platforms (js/npm/dart etc) but it would make life easier if there would be open extension points. IIRC IntelliJ plugins system supports that

Roman Liutikov 2025-10-31T11:00:31.748819Z

maybe that's something that can be done in a separate plugin. Intellij can already index js/ts/dart etc

2025-10-31T11:04:01.526369Z

Cool, yeah ClojureDart 'suffer' from the same problem. I love using it instead of Dart, but it would be nice if there was better integration with Dart libraries. Even if it is just for the Flutter lib, which is what one uses 90% of the time. Anyway, thanks for this, it is very interesting.

cfleming 2025-10-31T17:05:23.431759Z

I'm actually working on this right now, for JS at least. I'm planning to use TS types (.d.ts info) for the JS completion. It's a big project, but it is on the way. Once that is done I'm also planning to add similar support for cljd, since the process will be similar.

🔥 7
cfleming 2025-10-31T17:05:48.645129Z

But the stubs idea is a great hack for the meantime for sure, thanks @roman01la!