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

Feature request: Send to REPL/Terminal #409

Open
naxels opened this issue Feb 14, 2024 · 2 comments
Open

Feature request: Send to REPL/Terminal #409

naxels opened this issue Feb 14, 2024 · 2 comments

Comments

@naxels
Copy link

naxels commented Feb 14, 2024

Is this the right repo?

This is specifically a request for VSCode

Description:

When working in VSCode with Python, Jupyter, F#, Clojure, I can hit a keyboard combo (usually CMD + Enter on Mac)
and the code is either executed intelligently in a REPL/Notebook tab (like Clojure, Jupyter) or send to a REPL terminal (like Python, F#)

Currently I have a separate terminal tab in VSCode with iex -S mix and copy/paste the code to execute

Proposed solution:

I would love to have the keyboard combo send my highlighted code to a REPL/Terminal like Python,
where if no REPL terminal is running, it will start one & execute, else it will send the highlighted code (or line if no highlight) to the REPL.

This enables rapid REPL driven development :)

Thank you for considering!

@lukaszsamson
Copy link
Collaborator

Nice idea. Please create a PR

@naxels
Copy link
Author

naxels commented Feb 15, 2024

Nice idea. Please create a PR

Unfortunately I don't know enough about VSCode extensions & TS to help out.

Looking at both Python and F#, it's a bit more involved than just opening a terminal and running a command:
https://github.com/microsoft/vscode-python/blob/main/src/client/terminals/codeExecution/repl.ts
https://github.com/ionide/ionide-vscode-fsharp/blob/main/src/Components/Fsi.fs

And for Clojure it also create an output window right in the editor:
https://github.com/BetterThanTomorrow/calva/blob/published/src/nrepl/repl-start.ts

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

2 participants