Fork me on GitHub
#cursive
<
2022-02-17
>
lspector00:02:24

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?

salam01:02:26

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)

cfleming21:02:49

Thanks, I’ll get that fixed.

gratitude-thank-you 2
jaime07:02:35

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?

manutter5112:02:45

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.

jaime20:02:57

Awesome, that did the trick. Thanks a lot!

👍 2
manutter5112:02:16

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.

jaime20:02:59

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

emccue16:02:52

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

emccue16:02:06

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

emccue16:02:13

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?

emccue17:02:35

Does not seem to since source is not an actual program

staypufd07:02:19

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

benny16:02:58

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:

java.lang.NullPointerException
	at cursive.notifications.SourceRootNotificationProvider$AddSourceRoot.lambda$run$0(SourceRootNotificationProvider.java:119)
	at com.intellij.openapi.roots.ModuleRootModificationUtil.lambda$updateModel$9(ModuleRootModificationUtil.java:135)
	at com.intellij.openapi.roots.ModuleRootModificationUtil.modifyModel(ModuleRootModificationUtil.java:143)
	at com.intellij.openapi.roots.ModuleRootModificationUtil.updateModel(ModuleRootModificationUtil.java:134)
	at cursive.notifications.SourceRootNotificationProvider$AddSourceRoot.run(SourceRootNotificationProvider.java:116)
    ...

salam01:02:00

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

benny16:02:36

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/1.10.3.822/libexec/clojure-tools-1.10.3.822.jar 
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/1.10.3.822/libexec/clojure-tools-1.10.3.822.jar 
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 (RestFn.java:139)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)