Skip to content
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

evalCurrentFormInREPLWindow without cursor moving to REPL #229

Closed
grierson opened this issue Jun 17, 2019 · 7 comments
Closed

evalCurrentFormInREPLWindow without cursor moving to REPL #229

grierson opened this issue Jun 17, 2019 · 7 comments

Comments

@grierson
Copy link

grierson commented Jun 17, 2019

When I run the 'evalCurrentFormInREPLWindow' command my cursor moves to the REPL buffer.
Is there a way for the cursor to remain in the text buffer after running the command?

(+ 1 1)|
calva.evalCurrentFormInREPLWindow
(+ 1 1)|  ;; Cursor should remain here, not move into REPL buffer.
@PEZ
Copy link
Collaborator

PEZ commented Jun 19, 2019

Hello, thanks for suggesting how Calva can improve!

Can you elaborate some on why you want this behaviour?

@grierson
Copy link
Author

grierson commented Jun 19, 2019

Can you elaborate some on why you want this behaviour?

  • The output windows works like this however the REPL window has prettier output. (Colours and Pretty Print support)
  • I like to evaluate each expression individually as described in this post REPL DEBUGGING: NO STACKTRACE REQUIRED. With the cursor jumping from the text buffer to the REPL buffer every time I run 'calva.evalCurrentFormInREPLWindow' I have to keep switching back to the text buffer.

@alza-bitz
Copy link

Can you elaborate some on why you want this behaviour?

The output windows works like this however the REPL window has prettier output. (Colours and Pretty Print support)
I like to evaluate each expression individually as described in this post REPL DEBUGGING: NO STACKTRACE REQUIRED. With the cursor jumping from the text buffer to the REPL buffer every time I run 'calva.evalCurrentFormInREPLWindow' I have to keep switching back to the text buffer.

@grierson @PEZ I've also hit this issue and I would also prefer the cursor to stay in the editor.. Glad I checked the existing issues before creating a new one! 🙂

@Lakret
Copy link

Lakret commented Aug 28, 2019

I also hit this problem. It's also very different from how all other REPL-enabled languages work in VS Code, for example in Elixir LS and in Julia LS cursor stays in the editor. The typical workflow is to evaluate stuff from the editor, change it in the editor, and re-evaluate it, so jumping to REPL seems like more of an outlier than normal workflow. Having an ability to disable this behaviour would be highly appreciated :)

@PEZ
Copy link
Collaborator

PEZ commented Aug 28, 2019

Point noted, @Lakret . However, for Calva the typical workflow is rather to evaluate it in the editor. Of course, @grierson's point that the REPL window has prettier output applies still, but I wonder if those LS extensions support inline evaluation?

@bpringe
Copy link
Member

bpringe commented Aug 28, 2019

@PEZ I've made a change that keeps the cursor in the editor window when sending forms from the editor window to the REPL window. Testing now and then I'll submit a PR.

@PEZ
Copy link
Collaborator

PEZ commented Sep 4, 2019

Released!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants