This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # aleph (1)
- # announcements (3)
- # asami (32)
- # aws (12)
- # babashka (6)
- # beginners (43)
- # calva (36)
- # cider (3)
- # clj-kondo (3)
- # cljs-dev (2)
- # clojars (6)
- # clojure (66)
- # clojure-europe (14)
- # clojure-uk (2)
- # clojurescript (12)
- # conjure (1)
- # core-async (27)
- # cursive (17)
- # data-science (9)
- # datahike (1)
- # datomic (28)
- # emacs (34)
- # events (1)
- # girouette (3)
- # jobs (1)
- # klipse (4)
- # lsp (26)
- # malli (5)
- # off-topic (38)
- # portal (1)
- # releases (1)
- # shadow-cljs (72)
- # sql (7)
- # tools-deps (5)
- # vim (9)
- # xtdb (18)
I'm guessing this is fairly simple to solve, but I've got an existing project that doesn't have a JDK configured. I'm not sure how to configure it after a project is already loaded into IntelliJ. In fact, I only seem to get an option to choose a JDK when creating a new project. The docs show an "import" option, but if I delete the
.idea directory and
Open the project, there's no prompt for what kind of project it is or anything. Just loads it up as, what I can see, a fairly normal leiningen project, but then complains that REPL can't be launched on a right click of
project.clj because a JDK runtime could not be found. So yeah, where in the preferences can I set the project's JDK?
IntelliJ is a bit huge, eh? Even the attempts to explain where to find things fall short. But their own doc may show how to get to the JDK: https://www.jetbrains.com/help/idea/sdk.html#manage_sdks Happy hunting. 🙂 Ah, half way down on the right "Set up the project JDK". hth
btw, @U0KLE4WHZ, the way I start using I/J initially with a given existing project is "File>New>Project from existing sources". I can do that safely with a project already being worked. At the end it will ask if you want to overwrite any existing .idea. Just confirm. You are right, btw, "Open" just opens the directory for editing.
@U0KLE4WHZ Cursive documentation mentions the Project SDK setup, though for creating/importing new projects only: https://cursive-ide.com/userguide/first-repl.html https://cursive-ide.com/userguide/leiningen.html https://cursive-ide.com/userguide/deps.html https://cursive-ide.com/userguide/projects.html
worth reading that whole user guide! it's written very concisely, but yet in enough detail, to get a solid understanding of all of Cursive's capabilities. definitely worth the time reading it!
I recently learned about git worktree and would love to use this ability to have different branches of a project checked out at the same time. However, it seems a manual hassle to set up the new project, run configuration etc in Cursive. Is there a good solution for this?
i'd very interested in something like this, because it's quite a hassle to switch between branches and constantly stashing/shelving changes. i would much prefer to just have just duplicate source trees checked out, but there should be some good way to distinguish them when opened in parallel and that should probably be a IDE-level feature, which doesn't exist IMHO
It seems like this would probably have to be supported by IntelliJ's git support, but there's not much out there, basically this: https://stackoverflow.com/questions/36438333/how-do-i-use-git-worktrees-in-intellij-idea-2016-1
Is there anything Cursive-specific you would want from this, or is it more of an IntelliJ question?
I guess it’s more of an IntelliJ question, but I’d love for the Cursive stuff to work as well.
I don’t care about IntelliJ’s git support in this regard. What I envision is this:
I’m working on feature A and I’m spinning up the environment. Someone asks me about feature b. I create a worktree, check out their branch, look at their code (in Cursive), answer their question, delete the worktree, and start using Cursive for feature A, which is now done spinning up.
The problem, as I see it, is not git support. I do my git stuff elsewhere. It’s the setting up of the project files, REPL and other project specific stuff to do with IntelliJ/Cursive, that I want to avoid having to do every time I do
git worktree add ./temporary.
git worktree is probably not widely used, so I didn’t expect any specific support for it 🙂 I was just hoping that there was! 😄
I read a different thread where Dmitriy Smirnov, one of the IntelliJ maintainers, said that you could commit the
idea project files. I don’t like that for this project at work, lots of different people working on it, and I’d like the project to be free of cruft like that. But I get the idea (heh)
git worktree add ./alternate and then never remove it. Set up project files once, then reuse it every time I want to do some temporary stuff. I figure that might work for most of my use cases. It’s nowhere near as limber as I’d hoped for, but I can still
git worktree add ./another when I don’t need to use IntelliJ, e.g. when I just need to read something as plaintext in
less or whatever.
Maybe there’s some easy, git-worktree-unrelated way to copy idea files and have them “just work”™ under a different folder? (tbh I haven’t even tried just copying them, yet 😅 )