Julia-vterm provides a major-mode for an inferior Julia process (or REPL) that runs in vterm, and a minor-mode that extends julia-mode with the ability to interact with the inferior Julia process.
The functionalities required for typical REPL interaction have been implemented. While I would like to keep this package simple, suggestions are always welcome.
If you want to use Julia with [[https://orgmode.org/worg/org-contrib/babel/][Org Babel]], please consider trying [[https://github.com/shg/ob-julia-vterm.el][ob-julia-vterm]]. It uses julia-vterm and provides a solid babel development experience with session and asynchronous execution support.
For manual installation, download =julia-vterm.el= into somewhere in your local directory and use =package-install-file= command. Please make sure [[https://github.com/JuliaEditorSupport/julia-emacs][julia-mode]] and [[https://github.com/akermu/emacs-libvterm][emacs-libvterm]] are installed and configured correctly.
Turn on =julia-vterm-mode= in a =julia-mode= buffer to use this package. A symbol “⁂” in the mode line indicates that the julia-mode buffer is ready to interact with the julia-vterm REPL. Add the following line to your init file to enable =julia-vterm-mode= in =julia-mode= buffers automatically.
By default, the command named =julia= in your =PATH= is used. You can use a Julia executable in any path by setting the =julia-vterm-repl-program= variable to its absolute path. The variable can contain switches for the =julia= command. For example, you can use a =julia= executable at a certain path, with 4 threads enabled, by the line like the following.
=M-x julia-vterm-repl= (or =M-x julia= if no other packages define it before julia-vterm is loaded) opens an inferior Julia REPL buffer.
In a julia script buffer with =julia-vterm-mode= on, you can open a Julia REPL with =M-x julia-vterm-switch-to-repl-buffer= (or =C-c C-z=). See below for other commands.
Both of the above operations open a REPL with the default session name =main=. You can specify a different session name by using the prefix argument =C-u=. A new session will be created and opened if there is no REPL with that session name.
You can also specify a session name by defining a file local variable =julia-vterm-session= (or =julia-session= if no other packages pre-define it). If the variable is defined, =C-c C-z= will open a REPL with that session name.