This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2015-11-30
Channels
- # admin-announcements (13)
- # announcements (2)
- # avi (1)
- # aws (10)
- # beginners (427)
- # boot (3)
- # cider (4)
- # clara (26)
- # cljs-dev (21)
- # cljsrn (24)
- # clojure (205)
- # clojure-dev (32)
- # clojure-india (26)
- # clojure-japan (1)
- # clojure-russia (256)
- # clojurescript (41)
- # clojurex (1)
- # cursive (38)
- # datavis (99)
- # datomic (15)
- # emacs (19)
- # events (2)
- # funcool (5)
- # immutant (45)
- # ldnclj (3)
- # om (60)
- # omnext (4)
- # onyx (383)
- # overtone (7)
- # parinfer (1)
- # re-frame (3)
- # reagent (7)
- # ring (1)
- # testing (5)
hello @cfleming, I am having a trouble with lein projects in IDEA14CE + cursive 0.1.71:
I do:
1. lein new dude
2. launch idea
3. add dude as a new project
4. right click on project.cljs, add as lein project
5. cmd+; to open project settings
6. set project SDK to java8
7. set "src" as source folder
8 .set "test" as test folder
9. open project.clj
==> defproject
symbol is recognized (not highlighted)
10. open src/dude/core.clj
==>`ns`, defn
, println
symbols are highlighted as unresolved.
idea 14.0.1 CE
cursive 0.1.71
$ lein -v
Leiningen 2.5.3 on Java 1.8.0_31 Java HotSpot(TM) 64-Bit Server VM
#project.cljs deps:
[[org.clojure/clojure "1.7.0"]]
Would you have any idea what the cause might be?
It might have started after update to cursive 0.1.70 from 68 or 69.
After that update REPL configurations stopped working on existing project, spitting out Error creating JavaParameters
alert.
But I cannot confirm that update is the actual cause.Hi @misha, sorry you’re having trouble. You shouldn’t need to do most of those steps, opening the lein project after lein new whatever
should add the lein project and set up src
and test
folders.
that was true. but now - the way I described - is the only way it sort of accepts new project as the actual clojure project
See here: https://cursiveclojure.com/archive/1567.html#1615 for a possible solution to the JavaParameters issue.
if I do
idea -> new project -> select project.clj
idea wraps it in a temp_project$324234
folder with the only project.clj file in it@cfleming: I'll try cleaning up java sdk paths. but I think i;d be rather weird, if it'd fix the "new project" setup issue. thanks
Can you reproduce the issue (i.e. import a simple lein new
project) and then send your log? Help->Show log in Finder/Explorer
but I have a strong feeling, that it is a result of my whole setup getting somehow corrupted
It does sound like that, but I’m not sure what the exact problem could be - it sounds very strange.
Feel free to DM me your log, or mail it to <mailto:[email protected]|[email protected]>, whichever is easier.
lein new colin
idea -> import project
pick colin
import from existing sources
select lein projects
==> `unable to proceed: nothing found to import`
ok, if anyone is interested, the solution to the issue above I went with is: "update to IDEA 15" : )
When I turtle around the editor using the [Cntl <-] and [Cntl ->] keys I expect the 'Cntl' part of the action to be jumping the cursor past whatever bit of syntax I am at. It is usual for Clojure names to be-like-this. Just one [Cntl <-|->] ought to do the trick - ought to get me past the whole of a name-with-plenty-of-hyphens. Should I raise an issue for speedier editing?
@cjmurphy: What you probably want to do is bind those keys to Structural Move Forward/Backward. That should jump over Clojure units.
@jaen: Cursive just invokes lein, so if you configure the repo in your project.clj it will be picked up.
I'm using boot actually. Maybe I'll explain my exact use case - basically I'm using a docker container to develop in, I mount both the code inside and the .m2
folder, so the project sees it under ~/.m2
but from outside in Cursive this will be a different directory.
So I'm wondering if there's some way to specify for Cursive to look for sources for indexing there?
Hmm, I don’t think so, no. Since Cursive just invokes lein, you’d have to be able to tell lein to do this somehow. One option would be to use :local-repo
, which would cache artifacts relative to the project. A bit messy but it might work.
(while you’re using boot, I assume you’re using the hack of generating a project.clj)
Okay will do. I 'think' I remember a time when IDEA did not understand camelCase for Java variables, but these days normal Java variables are jumped over without any need for key rebinding. So I thought would be good if it worked like that out of the box for Clojure code too.
@cjmurphy: Yeah, I think the structural movement should do what you want. Try it out, and if it’s not let me know here or file an issue.
@cjmurphy: One thing that you may or may not expect is that it’ll jump over a whole list if it’s the next thing in the way.
@cfleming: yep, generated project.clj
hack. So basically if I emit this attribute - https://github.com/technomancy/leiningen/blob/master/sample.project.clj#L119 - in the generated project.clj
Cursive should just understand that and should look in my docker cache instead of ~/.m2
, yes?
@cfleming: yup, the paths appear to point to the docker cache directory now that I added this key; thanks!
Those re-bindings take over some other keys and the editor becomes a pretty big 'jumper' (for instance right across parens, from '( all the way to ')). I think this will be better however. Was annoying to have to slam so many right keys just to get past a-name, esp when coming from Java where I think variables are jumped over OOTB.