This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-06-02
Channels
- # announcements (37)
- # babashka (9)
- # beginners (172)
- # calva (7)
- # cestmeetup (28)
- # chlorine-clover (27)
- # clj-kondo (2)
- # cljs-dev (45)
- # cljsrn (8)
- # clojure (185)
- # clojure-dev (27)
- # clojure-europe (6)
- # clojure-finland (3)
- # clojure-nl (5)
- # clojure-uk (13)
- # clojuredesign-podcast (4)
- # clojurescript (54)
- # conjure (19)
- # core-typed (1)
- # cursive (40)
- # datomic (9)
- # emacs (5)
- # figwheel-main (34)
- # fulcro (238)
- # graphql (14)
- # hugsql (3)
- # leiningen (4)
- # malli (6)
- # off-topic (12)
- # pedestal (5)
- # portkey (19)
- # protorepl (8)
- # rdf (2)
- # re-frame (23)
- # reagent (3)
- # reitit (16)
- # shadow-cljs (29)
- # spacemacs (12)
- # sql (1)
- # xtdb (15)
On this page in the Cursive docs https://cursive-ide.com/userguide/deps.html I cannot seem to be able to click the copy link button next to "Create a new project with Deps". Same goes for a lot of the other headers. I'm only able to click the first two: "Configuring Deps" and "macOS and Linux"
Which browser are you using? I’ve just tested that with FF, Chrome and Safari on OSX and it works fine.
just a heads up - if you use the "Load File in REPL" action while the index is being updated you'll get Error evaluating - class com.intellij.openapi.project.IndexNotReadyException: Please change caller according to com.intellij.openapi.project.IndexNotReadyException documentation
in the repl
I guess most of us can interpret the error anyway
Is there a way how to hint Cursive types of paths added through deps.edn? It seems to choose a type using some heuristics but the result is less than optimal.
I’d have to go back to the code to check, but IIRC, anything in the test
alias becomes a test root, and everything else becomes a source root. However, since this is a bit crap and there really isn’t a better way to do that with deps, you can manually mark particular roots as test roots and Cursive will leave that when syncing later.
Thanks, it seems that everything in test
paths ends up being marked as test sources. If I manually mark them as regular sources this info is reset on re-import. I will try to rework the deps structure so I can mark sources as test manually instead of regular. But maybe it'd be better if it didn't reset anything manually set.
One question is: why would you want something under the test alias not marked as a test source?
Right now the reason is there is an overlap between aliases. But now that I know what is the system for marking some paths as test sources I can rework it.
Basically there were aliases for many little things but tests ran just with clj -A:test ...
instead of combining all those.
It works! It needed a manual mark-as source dirs for the first time but then it no longer changes it to test sources. Thank you.
When I'm using Intellij 2019, I can get autocompletion of the available version for the library {:mvn/version ""}
in deps.edn file.
After upgrading to Intellij 2020.1, I don't get autocompletion anymore. How to enable it back?
I think I remember hearing about some kind of java-like dot notation completion in Cursive for methods/props. Is that a thing? How do I use it?
if you type (.
and optionally some more chars, then hit ctrl-space it will give you autocomplete options
If you have an object whose type can be determined in the first arg position, then it will be contextual to that
so if cursor after . in (. (java.util.Date.))
- will give you method completions from Date
Thanks, I use that one, but I heard there was a faster option that lets you type the subject first and then tab (without threading too). Maybe I'm wrong.
Actually, Cursive does lots of magic here but not for the dot form - that’s on my to-do list.
You can also do (my-obj .|)
and you’ll get the context-sensitive method/field completions, and when you auto complete the method and receiver will be switched.
interesting, i’ve been using cursive for years but never known it supports the 2nd from of code completion.
Yes, I really need to document this, it’s one of the coolest features in Cursive and I’ve talked about it on the mailing list etc but have never properly put it in the doc.
@U0567Q30W Nice! That second one is what I was thinking of
@folcon I'm not sure - I think there is supposed to be something where you type with dot notation like you would in Java, then press tab when done, and it is converted to the normal clojure interop notation (have tried, but doesn't work, I think I'm missing something)
i think what you're describing is called Postfix Completion in intellij idea. as you can see from the screenshot attached, cursive doesn't seem to provide any postfix completion template for clojure.
I talked about this over here: https://clojurians.slack.com/archives/C0744GXCJ/p1591161803088400?thread_ts=1591113838.079600&cid=C0744GXCJ
I can't see all variables when I stop at a break point. The most current frame is selected, but I can only see variables that belongs to the namespace where I started the execution. Very strange and annoying, because now I can't evaluate variables in the function that I put the break point either. I run Cursive 1.9.1.-2019.3, Java 1.8.0_241 and IDEA Community 2019.3,5.
I upgraded to IDEA 2020.1 and Cursive 1.9.1-2020.1 and now it works!
I agree, computers are weird sometimes!
The old problem still exists though, that I can't evaluate anything when I'm at a breakpoint, except numbers like 123 but not expressions or anything with a variable, e.g.: (+ 1 2 3) - I get the error message: Invalid expression : ). I have clojure selected as language in the evaluation window popup.
That’s https://github.com/cursive-ide/cursive/issues/2345, which is fixed in the latest EAP series but is not in a stable release yet.