-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resolve dependencies off package.json directly (better shadow-cljs support) #2333
Comments
Note that |
npm deps don't seem to resolve, and it would be really useful if they did - I get a lot of "cannot be resolved" false positives for things required using shadow's syntax: ["@material-ui/icons/Stars" :default Stars]
["@material-ui/icons" :as mui-icons]
["@material-ui/pickers" :refer [KeyboardDatePicker]] In this example, cursive can resolve neither |
Yes, especially when working with react-bundling apps like reagent / re-frame / om.next / fulcro this is an Issue often encountered. Our team would really appreciate a feature, that takes this into account. |
IntelliJ has a NodeJS plugin. Is it somehow possible for Cursive to hook into that? |
It's possible to hook into it's package.json support, yes, but that doesn't supply the exports from those packages. That is provided by the JS support, and that is very hard to integrate with. I've made several attempts, but it relies on the source looking very much like JS, unfortunately. |
@cursive-ide e.g. ["react" :as react] Would be the same as: (def react nil) ;; nil or whatever and similar for ["@mui/material" :refer [CardActionArea]] So that we don't get those annoying warnings. This could be an option that can be toggled, I personally work a lot using ClojureScript, and it'd be really good to not mark them as warnings. |
Has anyone ever managed to resolve npm dependencies installed by shadow-cljs in cursive?
Cursive always displays these as
“x cannot be resolved”.
This because the npm dependencies are in package.json but not project.clj - Cursive seems to only scan those in project.clj. Thoughts?
PS:
shadow-cljs pom
and importing this via Maven didn't workThe text was updated successfully, but these errors were encountered: