This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2018-12-29
Channels
- # beginners (29)
- # boot (17)
- # calva (1)
- # cider (31)
- # cljs-dev (3)
- # clojure (169)
- # clojure-europe (1)
- # clojure-france (1)
- # clojure-russia (40)
- # clojure-serbia (3)
- # clojure-uk (42)
- # clojurescript (19)
- # clr (3)
- # core-async (7)
- # core-typed (3)
- # cursive (43)
- # datascript (4)
- # datomic (2)
- # dirac (4)
- # emacs (2)
- # fulcro (85)
- # funcool (1)
- # nrepl (5)
- # off-topic (14)
- # shadow-cljs (28)
- # spacemacs (5)
- # tools-deps (2)
@andreas862 How is the macro defined?
@cfleming nothing fancy from what I can see https://github.com/borkdude/respeced/blob/master/src/respeced/test.cljc
or... it is fancy impl/deftime
wraps all the declarations... Of course Cursive can't parse that
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.
Staring at a file with 300 warnings isn't any fun
@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
.
See the doc here: https://cursive-ide.com/userguide/macros.html
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
@cfleming Can't find do
in specify list
or map
for example
typing m
reveals five functions with only min
and max
from core
@andreas862 Which Cursive version are you using? This was added recently in 1.8.0
@cfleming 1.8.0-2017.1
@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.
Typing only m
fills it with six alternatives, where only min
and max
are from core
If I type (m
in the file I get a lot of completion alternatives
@andreas862 Can you send a screenshot with do
entered in the dialog like above?
@cfleming screenshot attached
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
@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
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.
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.
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.
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...
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.
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?
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.
(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)
i.e. this was my formatting before auto-format: https://puu.sh/CoUKu/a12df89ccb.png and after: https://puu.sh/CoULo/6176d1fa53.png
(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)
(aligned as in have my binding names right-padded to equal length)
@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 😞
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…