Send code to Julia REPL? #1710
Replies: 14 comments 6 replies
|
I am eagerly looking for a solution like this, I don't think there is a built in command yet for this, have you found a work around for this ? |
|
The "killer" feature would be to have a built-in REPL for any interactive language. For working with interactive languages (e.g. R, julia) the ability to "send code to REPL" is essential. In vim, you have e.g. the nvim-r plugin which is fantastic for R, but doesn't help at all with julia, for example. The ideal solution for helix would:
One of the amazingly useful features that nvim-r has is I have no idea how this would be implemented, unfortunately; it may require an integrated terminal (#1976), I don't know. But if you want be be able to use helix as an editor for a language like R, you need something like this. |
|
I wrote something quick for myself to use. It doesn't have a built-in terminal for helix, it relies on tmux instead. See https://gist.github.com/RobinJadoul/aab9ea148dbd2a81cc1e896120638cf1 for what I did |
|
This sounds a lot like vim-slime https://github.com/jpalardy/vim-slime This plugin is super useful: It doesn't matter what it's running, making it super versatile |
|
+1 that this would be super useful |
|
Yes I use this all the time with python and R in vs code. Would love this in helix. |
|
this is a very viable solution i think which can be added directly in helix, given that it's a rust library to send / receive data from interactive shell scripts https://github.com/andyk/ht I think even a macro can be hacked to do |
|
The Intellisense does not work for me, as configured. I tried NVIM, but the setup becomes overwhelming, in that sense HELIX is amazing. It would be nice if we could use the REPL like in VSCODE. |
|
Note that there are quite a few work-arounds posted in issue #2806, for example #2806 (comment) . |
|
I wrote up my setup to send code from Helix to the REPL: https://maurow.bitbucket.io/notes/helix-julia-latex-setup.html |
|
I create a github repo for my workflow integration for Helix editor, Zellij, AI CLI apps, and REPL environments built around two minimal scripts with nearly zero dependencies. Video showcases are included in README for demonstration. https://github.com/milanglacier/Helix-Zellij-AI-REPL-Workflow |
|
there's this blogpost I have used to set up TidalCycles for live coding: https://int8.tech/posts/repl-programming-helix-zellij-devenv/ |
|
Here is a tmux setup for sending code to a Julia REPL [keys.select.space.e]
e = ":pipe-to tmux load-buffer -b repl - \\; paste-buffer -b repl -t ':2'"
n = ":sh tmux new-window -dS -a -n 'repl' zsh \\; move-window -ad -s ':=repl' -t ':1'"
k = ":sh tmux kill-window -t :repl \\; move-window -r"
j = ":sh tmux new-window -dS -a -n 'repljulia' julia --project=@. \\; move-window -ad -s ':=repljulia' -t ':1'"
p = ":sh tmux new-window -dS -a -n 'replpython' ipython3 --no-autoindent \\; move-window -ad -s ':=replpython' -t ':1'"
[keys.normal.space.e]
e = ":pipe-to tmux load-buffer -b repl - \\; paste-buffer -b repl -t ':2'"
n = ":sh tmux new-window -dS -a -n 'repl' zsh \\; move-window -ad -s ':=repl' -t ':1'"
k = ":sh tmux kill-window -t :repl \\; move-window -r"
j = ":sh tmux new-window -dS -a -n 'repljulia' julia --project=@. \\; move-window -ad -s ':=repljulia' -t ':1'"
p = ":sh tmux new-window -dS -a -n 'replpython' ipython3 --no-autoindent \\; move-window -ad -s ':=replpython' -t ':1'"I am using windows instead of panes with a tmux keybinding (ALT+#window_number) that allows to go back and forth between the helix window and the julia REPL (and other repls, here bash and python). It works in normal and selection mode. This setup assumes that the REPL is the second window. Only one REPL session -of your favorite language (bash, python, julia here)- is allowed and calling another one will just reposition the REPL next to the editor window. |
|
I would like to contribute my own solution: it uses zellij and zjctl (and nushell). |
Uh oh!
There was an error while loading. Please reload this page.
I apologize if this is covered somewhere already (I couldn't find it) -- is there a way to send Julia code to its REPL (similar to vim slime)? I normally use VS Code, but am curious about command line editors and Helix looks amazing. Setting it up with Julia LSP was a breeze, and I had syntax highlighting and intellisense within minutes. However, the icing, so to speak, would be having an interactive, notebook like support since that is how Julia is often used. Something like having Helix on one side of a Zellij window and Julia REPL on the other.
Thanks in advance and kudos on this project!
All reactions