Fork me on GitHub
#cursive
<
2016-11-22
>
be904:11:25

I use clojure.java-time library (https://github.com/dm3/clojure.java-time) in several projects, and for some reason functions in its namespace cannot be resolved. This holds true for every project.

be904:11:19

so it all works, but can’t be resolved by cursive for some reason

be904:11:55

Could it be that the name (`java-time`) is a top-level namespace without dots? Not a common thing in Clojure world

danielcompton07:11:56

Yeah that would be my guess. Just to check, does the code actually run?

danielcompton08:11:04

@be9 it's because it uses Potemkin import vars so Cursive doesn't understand it

cfleming09:11:06

@danielcompton @be9 Cursive does actually understand Potemkin’s import-vars. I’ll look to see if I can see why that’s not working.

yonatanel09:11:42

Intellij is rather stuck after messing with defmacro in REPL. Is there a way to report the problem before I kill it?

yonatanel09:11:40

Killed it... It got crazy, with wrong macroexpand results.

be909:11:34

@danielcompton the code does run

yonatanel12:11:14

@cfleming I want to change indentation of macros like as-> but they are not listed in Form Parameters tab of code style options.

yonatanel14:11:19

"Coming Soon: A much better way to do this." :D

yonatanel14:11:57

Am I missing something? After setting indentation to 2 it only starts at the second form:

(-> 1
    inc
  inc)

yonatanel14:11:18

When I choose "Indent" instead of 2 it works

yonatanel15:11:55

@cfleming I wrote my own threading macro. How do I tell cursive to count one more arg when checking arity? Perhaps it doesn't even have to check anything inside a macro it doesn't know?

cfleming15:11:27

@yonatanel You can use https://cursive-ide.com/userguide/macros.html and set it to -> or ->>, assuming your macro has the same layout as one of those.