-
-
Notifications
You must be signed in to change notification settings - Fork 222
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
Extension API: Evaluate via Calva's REPL connection #1719
Comments
Thanks for this issue. It is about time we think about some important extension points. Evaluations being the most interesting to start with I think. (I renamed the issue to have something we can close in anything like the near future.) A thing to consider here is Joyride, of course. When working with Joyride scripts that's where the REPL is connected. Maybe that is fine for many purposes, but at least could be good to contemplate... I find it hard to think about it without my brain frying, actually. Related: What Calva really needs is some way to create more than the two REPL sessions it has today, as #76 has suggested for very long now. |
My use case is for a Joyride script to be able to direct Calva to take the currently-selected form in the editor and submit it to the nREPL for that editor and get back (a promise of) the result of the evaluation to use in the next step of the Joyride script. I don't mind whether that's just a string of the result, such as nREPL returns, or whether it's a hash map containing that string -- the string is the important part for my use case. But I hadn't considered how you might develop such a script, using Joyride's nREPL, since that would not be the nREPL session in which I wanted the code evaluated -- it must be the main project's nREPL since it will be JVM-based code that needs the project context, not the Joyride context. |
Yes, that's going to be a problem as long as we don't fix #76. We might need some convenient ways to run Joyride code in the meantime. For now you can select some code (e.g. the current form), copy it, and paste it in the Joyride: Run Clojure Code.... I also find myself having a few |
Regarding Joyride vs Clojure REPL: I just pasted some Joyride code in my Joyride thread over at ClojureVerse that should make it more convenient to use the Joyride REPL without starting its nREPL server. |
Calva doesn't have an API that extensions can use. With Joyride around, having a proper API that extensions can use is very useful.
At the minimum evaluating code within an active nREPL connection and getting back a Promise with results would be extremely helpful.
The text was updated successfully, but these errors were encountered: