vscode-elixir-ls icon indicating copy to clipboard operation
vscode-elixir-ls copied to clipboard

Feature request: Send to REPL/Terminal

Open naxels opened this issue 1 year ago • 2 comments

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!

naxels avatar Feb 14 '24 09:02 naxels

Nice idea. Please create a PR

lukaszsamson avatar Feb 14 '24 10:02 lukaszsamson

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

naxels avatar Feb 15 '24 09:02 naxels