Fork me on GitHub
#cursive
<
2019-10-24
>
akond07:10:42

i know that cursive is not an open source, but my quest is to write a simple plugin for intellij in clojure.

akond07:10:07

i am here for clues

cfleming08:10:03

@akond It’s (mostly) possible, but it’s very annoying and in general in my opinion not worth it.

cfleming08:10:10

They don’t mix very well.

cfleming08:10:39

Is this for something you would want to release, or for a hobby project?

akond08:10:09

i was afraid of that. my second choice is kotlin then.

cfleming08:10:25

I highly recommend Kotlin.

cfleming08:10:48

It’s a nice language, and the whole path to using it for IntelliJ plugins is (unsurprisingly) very smooth.

cfleming08:10:13

Building a plugin using Clojure is annoying - you really want to use Gradle since there’s a lot of tooling there, but the Clojure Gradle story is still experimental. I used a plugin I hacked together myself, that later became Clojurephant but I don’t know what the status of that is.

cfleming08:10:58

It’s also tricky to get your classes loaded correctly, Clojure is inflexible in which classloader it lets you use.

cfleming08:10:38

And extending abstract classes in Clojure is really foul. I run a fork just to make that palatable (see https://docs.google.com/document/d/1OcewjSpxmeFRQ3TizcaRRwlV34T8wl4wVED138FHFFE/edit?usp=sharing), and that also helps with the classloader issue.

cfleming08:10:05

All in all, Kotlin is much easier unless you’re extremely bloody minded 🙂

akond08:10:17

i really like clojure, but i am also practical. thank you for your help.

❤️ 1
helios13:10:44

i thought cursive added support for resolving vas using import-vars from potemkin, but it doesn't seem the case 😞

cfleming23:10:01

@helios It should do. What’s the FQN of the import-vars you’re using there?

cfleming23:10:33

It should be either potemkin/import-vars or potemkin.namespaces/import-vars.