Replies: 2 comments 1 reply
-
@Deraen Thank you for creating this discussion! |
Beta Was this translation helpful? Give feedback.
0 replies
-
@liquidz Aha, that looks to already have much of what I need! So it can switch session based on the filetype, but it doesn't (yet) support automatically choosing session based on the folder? And I think I'd want to have the active session as option per buffer, but I'll give that a try and see how well it works for my workflow now. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Well, this is probably quite a large topic or feature, so maybe discussion is good place for this.
As I understand Vim-iced, currently there is single global nREPL connection that is used for all the files. You can within the one nREPL connection switch between Clj and Cljs repl (nrepl session?) with
:IcedCycleSession
.If one is running Clj app and nrepl server and e.g. Shadow-cljs and nrepl in separate processes, you can only connect to either of these.
Example project structure:
I think Fireplace supports this by keeping separate Clj and Cljs nrepl sessions (and probably also support case where both clj and cljs sessions use same nrepl connection). Evaluating from clj files uses clj session, and cljs files use cljs session. Cljc files I think use clj session, not sure if Fireplace has way to select which one to use for those.
Another case is using the editor to work on multiple projects, with separate nrepls for each, and potentially separate clj and cljs repl for each project.
I think Fireplace keeps track of repl session classpath, and selects the used session based on that (there are corner cases with cljs where all files might not be in classpath). And when automatically looking for nrepl connection, it looks for the port files in the file parent directories.
Have I understood correctly that Vim-iced doesn't currently support this?
Supporting all the cases, like shared code used by multiple projects, probably would require being able to override session selection for files. I think this could work quite well with the selector (sessions just need some of kind of identifier, e.g. parent directory name), and user could add the active session identifier to statusline.
Cursive also allows multiple REPL sessions in single project, but working on several projects requires multiple IntelliJ windows I think.
Cider seems to support this, and the documentation mentions many of the same cases I though about: https://docs.cider.mx/cider/usage/managing_connections.html
Beta Was this translation helpful? Give feedback.
All reactions