Fork me on GitHub

I have a student whose new IntelliJ/Cursive setup allows him to create a new leiningen project, start a REPL, and evaluate expressions, but all of the symbols in his core.clj are highlighed and there's a message saying that they can't be resolved, or something like that. Also, the auto-indenting doesn't seem to know it's Clojure code, and there is an error message somewhere about a missing python dependency. I'm sorry for the fuzzy details here, but I'm not in front of his machine now.... but is this enough to ring a bell for anyone that might give a hint of what I should tell him to try?


hey, Colin. i’ve been getting this NPE (“Got unexpected exception during formatting ClojureFile”) a lot when editing CLJS files which have namespaces requires as strings (e.g., ["react" :as react]) since i upgraded Cursive to 1.12.2-eap4. judging from the following line, it appears to have something to do with the new Optimize Requires/Imports code: at cursive.inspections.list.ClUnusedRequire.invoke(ListInspections.kt:31)


Thanks, I’ll get that fixed.

gratitude-thank-you 2

Hi, on the title bar, only the last part of the namespace is showing in full s.s.d.views , is there a way to show the full namespace by default?


Look in Preferences under Languages & Frameworks -> Clojure. The last item under Appearance Options is Editor Tab Style, which will abbreviate namespaces if you select Truncated Namespace, so try one of the other two options.


Awesome, that did the trick. Thanks a lot!

👍 2

By the way, I have my tabs on the right instead of at the top (Preferences -> Editor -> General -> Editor Tabs -> Tab Placement). Better use of space IMO, plus you get more control over the width of the tabs.


Oh nice tip. I don't show tab and nav toolbar though 😅


IDK the right place to ask this, but how can i make a REPL configuration "do what is in my zshrc"


export PATH=~/.nix-profile/bin:$PATH
nix-shell ~/system/shell.nix
source ~/.lumanu


want to source all those environment variables and if possible run within the nix-shell

AJ Jaro17:02:11

@U3JH98J4R Would configuring a Before Launch action that runs an External Tool work for this?


Does not seem to since source is not an actual program


Can you use “.” As it is an alias for source… ?


hello, I’m trying to open a gradle project and my source root (src/main/clojure) is not being recognized and I can’t add it via the IntelliJ notification. I continue to get an IDE error:

	at cursive.notifications.SourceRootNotificationProvider$AddSourceRoot.lambda$run$0(
	at com.intellij.openapi.roots.ModuleRootModificationUtil.lambda$updateModel$9(
	at com.intellij.openapi.roots.ModuleRootModificationUtil.modifyModel(
	at com.intellij.openapi.roots.ModuleRootModificationUtil.updateModel(
	at cursive.notifications.SourceRootNotificationProvider$


i don’t think Cursive supports Gradle or even Maven.


looks like my problem might be that my version of gradle (7.x) is not supported

Ernesto Garcia17:02:31

Hi all. I’m having an issue with a Leiningen project that includes Java source files through

:java-source-paths ["src-java"]
When I try to run a configuration that relies on Leiningen to run, I am getting the following IDE error: “Error running ‘REPL dev-site’: Error executing Leiningen configuration.”

Ernesto Garcia17:02:16

It seems that Leiningen is not finding Java Runtime, from idea.log

2022-02-17 18:14:14,069 [188710431]  DEBUG - #cursive.deps.DepsShimProvider - Executing deps via CLI, uberjar at /usr/local/Cellar/clojure/ 
2022-02-17 18:14:16,063 [188712425]  DEBUG -             #cursive.shim.Shim - Creating shim:
Namespaces cursive.leiningen.init, cursive.leiningen.project
Version 2.9.3
Files /Users/ernesto-reify/.lein/self-installs/leiningen-2.9.3-standalone.jar 
2022-02-17 18:14:16,063 [188712425]  DEBUG -             #cursive.shim.Shim - Shim URLs: file:/Users/ernesto-reify/Library/Application%20Support/JetBrains/IdeaIC2021.3/plugins/clojure-plugin/lib/shimdandy-impl-1.2.1.jar, file:/Users/ernesto-reify/Library/Application%20Support/JetBrains/IdeaIC2021.3/plugins/clojure-plugin/lib/cursive-lein-shim.jar, file:/Users/ernesto-reify/.lein/self-installs/leiningen-2.9.3-standalone.jar 
2022-02-17 18:14:16,336 [188712698]  DEBUG - #cursive.deps.DepsShimProvider - Executing deps via CLI, uberjar at /usr/local/Cellar/clojure/ 
2022-02-17 18:14:20,389 [188716751]   INFO -                         STDERR - The operation couldn't be completed. Unable to locate a Java Runtime. 
2022-02-17 18:14:20,389 [188716751]   INFO -                         STDERR - Please visit  for information on installing Java. 
2022-02-17 18:14:20,389 [188716751]   INFO -                         STDERR -  
2022-02-17 18:14:20,394 [188716756]   WARN -  #cursive.shim.IndicatorBridge - Exit called in Leiningen:
java.lang.RuntimeException: null
 at cursive.leiningen.project$add_standard_hooks_BANG_$fn__2318$fn__2319.invoke (project.clj:515)
    cursive.leiningen.project$add_standard_hooks_BANG_$fn__2318.doInvoke (project.clj:515)
    clojure.lang.RestFn.applyTo (
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)