This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # architecture (20)
- # beginners (140)
- # cider (155)
- # cljsjs (1)
- # cljsrn (29)
- # clojure (53)
- # clojure-dev (9)
- # clojure-italy (40)
- # clojure-nl (13)
- # clojure-poland (4)
- # clojure-russia (8)
- # clojure-uk (51)
- # clojurescript (74)
- # cursive (36)
- # data-science (1)
- # datomic (3)
- # emacs (14)
- # fulcro (11)
- # graphql (2)
- # java (21)
- # jobs (3)
- # nrepl (7)
- # off-topic (18)
- # om-next (1)
- # onyx (9)
- # portkey (8)
- # re-frame (72)
- # reagent (64)
- # reitit (4)
- # remote-jobs (1)
- # rum (1)
- # schema (1)
- # shadow-cljs (49)
- # slack-help (1)
- # spacemacs (8)
- # specter (7)
- # tools-deps (27)
- # vim (28)
It looks like Cursive marks a Java class import as unused if it is present only for a type cast.
@akiel No, it’s not yet, I need to update the doc for that. Basically you can select any var available in your project to resolve as, not just the predefined list.
is in my code, but the import of ZooKeeper is flagged as unused.
(log/trace :event :master-loop :zk-id zk-id :client-id (str "0x" (Long/toHexString (.getSessionId ^ZooKeeper client))))
@teng That’s very odd, I’ll take a look at that. Which JVM version are you using for your app?
@danielcompton I actually don’t know what the difference between those two files is.
@joelsanchez In your application, you mean? No, you can’t, since it’s stored on the client side of the nREPL connection, in Cursive
@ramblurr yes, it should work for CLJS. However there’s a bug where that popup isn’t shown at the definition of your
defxxx, you’ll have to use the intention from a usage, i.e. where you actually use it like
No intentions popup on that defnav line.. when i press
alt+space it says "the file is read only" (this is a specter library file)
@cfleming no, I meant in the REPL, inside Cursive. instead of just using the arrows, can I do a
filter on the history to find what I want? (like
history | grep ...)
@cfleming I tried the var of my macro. It even has specs. But I think I need something special in the spec to mark binding forms.
I want to get this fixed because the indentation for defn is broken because it cannot be resolved
@nick319 Sounds like it's not correctly recognised your Clojure project. Have you added your project.clj as a Leiningen project in IntelliJ? And does that correctly reference your source and test directories as such
@joelsanchez The thing is, when the code you type in the REPL is executed, it’s executed in the REPL process, i.e. in your application. This is a separate process from the IDE itself, which is where the history is stored.
@akiel Ah, I see what you mean. Unfortunately this won’t work yet, unless your macro looks just like one Cursive already understands (i.e. a new binding form that looks like a
let, or a
defxxx form or something similar).
@cfleming sure but, suppose I want to evaluate this
cursive could send this to the server (unbeknownst to the user of the repl):
(->> @cursive-history (filter (fn [s] true)))
(with-local-vars [cursive-history [:whatever :history :cursive :has]] (->> @cursive-history (filter (fn [s] true))))
alternatively, if Cursive sends to the server
(ns cursive) (def history ...) before anything else, maybe that would make it possible to access
@ramblurr re: the CLJS REPL, this is still a little janky but will get better soon. Unfortunately the test integration doesn’t work for CLJS yet, although I hope to fix that soon too.
@joelsanchez Sure, I see - it’s an interesting idea. I’m actually toying with some ideas about how to make the REPL more interactive at the moment, with more bidirectional communication between the server process and the IDE.