This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # adventofcode (20)
- # announcements (6)
- # asami (13)
- # babashka (9)
- # beginners (80)
- # calva (53)
- # cider (16)
- # clj-kondo (24)
- # cljs-dev (40)
- # clojure (13)
- # clojure-australia (9)
- # clojure-europe (117)
- # clojure-india (3)
- # clojure-italy (4)
- # clojure-nl (5)
- # clojure-sg (1)
- # clojure-spec (4)
- # clojure-uk (6)
- # clojurescript (6)
- # cursive (41)
- # datalog (5)
- # datomic (11)
- # emacs (9)
- # events (1)
- # fulcro (46)
- # integrant (31)
- # jobs (1)
- # kaocha (1)
- # lein-figwheel (3)
- # lsp (2)
- # meander (3)
- # missionary (4)
- # pathom (6)
- # portal (84)
- # re-frame (3)
- # remote-jobs (1)
- # reveal (2)
- # shadow-cljs (36)
- # tools-build (3)
- # xtdb (17)
I created an IntelliJ plugin that enables navigation to Clojure https://github.com/weavejester/integrant component code.
It supports navigation to init-key code from its key in a map. It also supports navigation from
#ig/ref to its target. It’s useful when navigating a large code base using Integrant/duct. Please let me know if anyone finds an any issue.
Actually, I thought I had another comment, but I think what you have is OK. Nice work! That must have taken some figuring out 🙂
Thanks! It’s my first plugin, so I appreciate your feedback! Yes, it took a lot of time to figure out Psi element tree 😅 It would be great if my plugin depends on only
cursive.psi.api.* packages, but I couldn’t find a good way to achieve what I want without
May I ask a question about testing my plugin? I’m trying to add a test, but
ClojureGoToSymbolContributor doesn’t seem to work in the test. Do you know how to enable it in the test?
Hmm, I don’t, sorry. What I would normally do is get the IntelliJ community source code, and look for other implementations of the base class (ChooseByNameContributor), and see where they’re used in tests. But I just checked a few implementations there and they don’t seem to be used in tests at all, at least not directly. It’s possible there are tests for higher-level things like Go To Symbol which use them under the hood, but I’m not sure, sorry.
Uh, JetBrains just announced Fleet, a new lightweight editor. https://www.jetbrains.com/fleet/ Since it's using intelliJ for the code-processing engine I'm curious to see what will come out of it, and if it could be a lightweight alternative for us clojurians (with cursive! 😉). I guess this is news also to you @cfleming?
It is news to me! I knew they have been working on various projects along these lines, but I didn’t know they were ready.
Is there a way to run all tests from IntelliJ? (Using Lein) I assume that will make the results more navigable than just running
lein test in the terminal. I have tried to add a run config. for clojure.test with "run all tests in module" but there was some IntelliJ error about the cursive config class that could not be cast to some II Base class and the run config does not run...
Could you send the exact error? Or even better, check to see if it appears in your log?
I don't know where to find it. It appeared in a pop up window which I killed.
Ok, I found II logs but not sure what to look for. I will try to re-create the error.
I've tried to get a Repl running clojure from clojure cli with this :jvm-opts :
it gives me an error:
Unrecognized option: --add-exports Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit.
That looks to me like your project is using the JDK bundled with IntelliJ, and it doesn’t support that option. There’s more information here about the syntax of that option in different JDK versions: https://stackoverflow.com/questions/40313090/java-9-options-add-exports-vs-xaddexports-not-recognized/40369977
Actually, I misread part of the stacktrace, it’s not using the IntelliJ JVM. But regardless, it’s a problem with the JVM, so I guess your Cursive project is using a different JVM to the one that’s picked up on the command line.
Just updated to 1.12.0 (not sure what I had before but I am on EAP channel) on IDEA 2021.2.3 and lots of (but not all) clojure.core symbols have stopped resolving in a babashka project (e.g.
ns don't resolve but
def does). I tried invalidating caches and even deleted
.idea and the
.iml file and re-setup the project but no dice. Anyone else seeing that in babashka projects?
the print-deps result contains a local/root dependency which doesn't make sense for this use case
What a co-incidence, I had this issue open in my browser and you commented on it just now: https://github.com/oracle/graal/issues/2666#issuecomment-982087148