This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-02-28
Channels
- # aleph (50)
- # announcements (3)
- # aws (35)
- # beginners (74)
- # boot (25)
- # calva (39)
- # cider (18)
- # clara (2)
- # cljdoc (18)
- # cljs-dev (24)
- # cljsrn (11)
- # clojure (166)
- # clojure-europe (13)
- # clojure-italy (5)
- # clojure-nl (6)
- # clojure-spec (35)
- # clojure-uk (263)
- # clojurescript (22)
- # clojutre (1)
- # code-reviews (34)
- # cursive (58)
- # data-science (2)
- # datascript (4)
- # datomic (4)
- # duct (6)
- # emacs (7)
- # figwheel-main (9)
- # fulcro (2)
- # graphql (3)
- # hoplon (22)
- # hyperfiddle (2)
- # juxt (5)
- # kaocha (6)
- # leiningen (33)
- # luminus (15)
- # off-topic (1)
- # pedestal (5)
- # reagent (18)
- # reitit (12)
- # shadow-cljs (171)
- # vim (5)
Hm. I just upgraded to 1.8.1-eap3
and it broke. I reverted back to lein 2.8.1 and still doesn't work anymore. I am able to run lein repl
from command line and then connect as a 'local' remote repl. This is the output of cursive trying to start a repl: https://pastebin.com/95Dt5Hiz
how do I remove a "resolve <thing> as" ?
Could cursive theoretically do some checking on type hints?
(defn take-number [^Number a] (inc a))
(defn foo []
(let [^String s "hi"]
(take-number s))) <--- Nice if I got a red / yellow squiggly
I have an issue in Cursive with my source root:
In my project.clj
, I have :source-paths ["clojurescript-src/src/cljs" "script"]
When I open a file under clojurescript-src/src/cljs/audyx/app/init
defining a namespace audyx.app.init
, I see an error
I donāt know what to do
Please help
From your screenshot, it looks like your audyx
folder is also a source path?
File -> Project Structure -> Modules -> (your module) -> sources
Should match what is in the :source-paths
above
I donāt know how it happened
Did that fix it?
I donāt know how to tell cursive to recalculate its source paths
In the short term, you can manually remove the content root from that dialog
When you created your module, did you import from your project.clj file specifically?
If you do that, my sources + dependencies are normally re-read from project.clj on every IDEA startup
I donāt remember
How can I recreate my module?
I donāt really know what a module is by the way
You should be able to fix that by right-clicking on your audix
folder and selecting āUnmark as Sources rootā from the āMark Directory Asā¦ā submenu
The problem with this approach is that every time I change the project.clj
, Cursive overwrites my choices
Hmm, I had a similar problem a while ago, something about a stray line in my project.clj file
The Content Roots in cursive should match your project.clj. Cursive shouldn't be adding additional roots
Do you have more than one :source-paths
entry in project.clj anywhere?
Itās a cljs project, it has one :source-paths entry per cljsbuild entry
Anyway, is there a way to reset the project from a Cursive perspective?
A restart of IDEA usually triggers a read from project.clj
Thereās also File -> Invalidate Caches / Restart
Trying itā¦
Crossing fingers
Same sameā¦
Would you post your project.clj?
I found the issue in my project.clj
:dbg {
:source-paths [
"clojurescript-src/src/cljs/audyx"]
It had some bad source-paths in cljsbuild
:thumbsup:
Another thing: How do we trigger a global search that search also in name of namespaces?
I'm guessing, btw, cursive uses the dev
profile
I remember that Shift-Shift used to do a global search
Now when I type a namespace that has a dash character in it , it doesnāt find it
for instance om-extensions
finds nothing while om_extensions
does
thats probably because of Java convensions
I think thats IntelliJ searching, and IntelliJ only understand valid java package names, so thats snake_case
no way!
clojure namespaces are always with dashes
That would be very disappointing
Is there a way to tell Cursive to not index certain directories? It regularly crashes when it tries to index node_modules, and since it doesnāt seem to understand shadow-cljs imports anyway, I donāt get code completion for JavaScript. So I would rather skip the indexing of JS modules and avoid the crashes.
You can try right-clicking the node_modules and selecting 'Mark Directory As Excluded'.