Geal / sbt-clojure

SBT plugin building Clojure code
MIT License
32 stars 13 forks source link

Lack of IntelliJ support #7

Closed decoursin closed 1 year ago

decoursin commented 1 year ago

I noticed that @rajcspsg updated this with: https://github.com/rajcspsg/sbt-clojure (branch latest_sbt_support).

It's awesome in theory, but the problem to me seems to be that my IntelliJ IDE will still complain that the clojure imports don't exist. As a result, all imports are red and using the functions are red too. That sucks. Is there any way around this, or is there any fix?

Otherwise, I'm stuck just having to compile them separately.

rajcspsg commented 1 year ago

@decoursin this may be due to https://youtrack.jetbrains.com/issue/FL-15340(Intellij doesn't support clojure directly only via cursive).

I suggest install both scala and cursive plugin. mark both scala src directory and clojure src directory as source directory.

If it still doesn't solve the problem then it is due to lack of clojure support in Intellij as mentioned above but not due to this plugin.

To support this feature in intellij, I think intellij scala plugin needs support to detect non java src directories and you have to create separate ticket for that feature in intellij scala plugin

decoursin commented 1 year ago

Yeah, that actually works. I had marked the clojure src directory as source directory, that didn't work by itself, but installing the cursive plugin combined with that does actually indeed work. Thank you.

Now, it sucks that I'd have to pay a Cursive licensing fee just to avoid this problem. I develop Clojure with Emacs. But that's not your problem haha

decoursin commented 1 year ago

I also tried this with the Clojure-Kit plugin (in combination with marking the clojure directory as source directory), but unfortunately that doesn't work - you need the cursive plugin.

rajcspsg commented 1 year ago

Unfortunately in JVM world Intellij is the king. No editor has support for gradle, scala, groovy like Intellij does. If it solves the problem, then you can close this ticket.