Fork me on GitHub
#cursive
<
2018-12-29
>
cfleming00:12:57

@andreas862 How is the macro defined?

Andreas Liljeqvist11:12:28

or... it is fancy impl/deftime wraps all the declarations... Of course Cursive can't parse that

Andreas Liljeqvist11:12:14

I propose that when :refer is present: Missing refers get marked as not resolving in ns-form and not further marked in rest of buffer. As a positive side-effect it will indicate directly that the refer might be missing even when not used.

Andreas Liljeqvist11:12:59

Staring at a file with 300 warnings isn't any fun

cfleming20:12:50

@andreas862 You can fix that. Put your caret on impl/deftime in that file, and then use “Resolve as…” to resolve it as clojure.core/do.

cfleming20:12:58

The screenshots are a bit out of date, in the dropdown list there’s now a “Specify…” option which you can use to choose do

Andreas Liljeqvist16:12:52

@cfleming Can't find do in specify list

Andreas Liljeqvist16:12:49

or map for example

Andreas Liljeqvist16:12:45

typing m reveals five functions with only min and max from core

cfleming18:12:37

@andreas862 Which Cursive version are you using? This was added recently in 1.8.0

cfleming21:12:58

So you don’t see something like this when choosing Specify…?

Andreas Liljeqvist10:01:44

@cfleming I have exactly the same dialogue but it seems to have wrong input or something. Typing d fills it things starting with de. Then typing o doesn't change the alternatives at all.

Andreas Liljeqvist10:01:02

Typing only m fills it with six alternatives, where only min and max are from core

Andreas Liljeqvist10:01:52

If I type (m in the file I get a lot of completion alternatives

cfleming09:01:47

@andreas862 Can you send a screenshot with do entered in the dialog like above?

rs07:12:07

Has anyone worked on a mixed project with clojure and kotlin/java ? Is using gradle the best approach here? Or can I use gradle for kotlin/java module and lein/clj.deps for the clojure module? What I want is I can depend and use the kotlin/java project from clojure module

cfleming08:12:37

@rdsr I use Gradle to build Cursive, which is basically exactly that. I developed this to do that: https://github.com/cursive-ide/gradle-clojure, but as the readme states you should use this instead: https://github.com/gradle-clojure

cfleming08:12:36

You could use lein for the Clojure part and then depend on a Gradle or Maven module for the Java/Kotlin part, but that will involve installing the Java/Kotlin part manually, which is a pain.

cfleming08:12:00

i.e. installing into your ~/.m2/repository whenever you change something.

cfleming08:12:07

You could also possibly use lein for everything with https://github.com/reutermj/lein-kotlin, but I haven’t tried that so I can’t vouch for it.

cfleming08:12:21

It’s 3 years old which isn’t a great sign.

cfleming08:12:37

Personally, I’d use Gradle.

cfleming08:12:02

BTW deps doesn’t help you, since it’s Clojure-only.

cfleming08:12:22

Actually, I lie, you could use deps instead of lein as I described above and depend on your Java/Kotlin as a Maven dep, but it has the same manual-install caveat.

rs19:12:10

I think I got a multi project working. When I start the clojureRepl task I think there must be a way to connect to it from clojure and have the same level of support as cursive provides from within an ide...

rs20:12:47

I think I got it working with remoteRepl from intellij/cursive.

cfleming20:12:53

Yeah, I think the remote REPL is the way to go, but I haven’t used the new gradle-clojure so I’m not sure.

rs02:12:24

Thanks things are working out OK. I'm now figuring out how best to setup a debug remote repl. Also, what do u use instead of the gradle-clojure plugin?

hmaurer20:12:00

Hi! Quick question: it seems like I can “break” structural editing by deleting a line with Cmd+Backspace (or select line + backspace), which makes the parentheses unbalanced. Then structural editing prevents me from typing a parentheses to rebalance them.

hmaurer20:12:03

How can I fix this?

hmaurer21:12:46

(also, is there a way to disable formatting over a project? Cursive’s built-in formatting does undesirable things, like format maps far beyond the line limit, making them utterly unreadable)

hmaurer21:12:54

or if there is a way to make it respect line limits that would be even better

hmaurer21:12:22

i.e. this was my formatting before auto-format: https://puu.sh/CoUKu/a12df89ccb.png and after: https://puu.sh/CoULo/6176d1fa53.png

Lennart Buit22:12:52

(Related: Is there a way to prevent Cursive from butchering my custom format, I like to align my let blocks, but if I refactor a name it breaks my formatting)

Lennart Buit22:12:25

(aligned as in have my binding names right-padded to equal length)

hmaurer23:12:29

@lennart.buit there is an option “Align let-binding values” in Editor -> Code Style -> Clojure. This might fix your issue; I haven’t found a fix for mine 😞

hmaurer23:12:03

I can disable “align map values”, which fixes my issue in the sense that it doesn’t attempt to format maps at all anymore, but…

rs02:12:24

Thanks things are working out OK. I'm now figuring out how best to setup a debug remote repl. Also, what do u use instead of the gradle-clojure plugin?