[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
A REPL plugin for Nvim
From: |
Alejandro Sanchez |
Subject: |
A REPL plugin for Nvim |
Date: |
Mon, 13 Mar 2017 20:36:36 +0100 |
Hello everybody,
I have been doing some Scheme work in Guile over the past few week and I’m the
one weirdo who doesn’t use Emacs, I use Nvim instead. The lack of proper REPL
support was annoying me, I had to go through the ritual of opening a new
terminal buffer and starting Guile with the correct parameters every time I
wanted to fiddle around with a snippet of code. So I made a REPL plugin instead.
Repo:
https://gitlab.com/HiPhish/guile-repl.nvim/
https://github.com/HiPhish/guile-repl.nvim/ (mirror)
Screencast of the plugin in action:
https://asciinema.org/a/106985
The plugin uses the terminal emulator to display the REPL, so the
aforementioned ritual is now nicely abstracted away behind a command. Users can
spawn any number of independent REPL instances, the buffers are updated
asynchronously, arguments can be passed to the command and every aspect can be
customised. The only downside is that it is still just a terminal running, so
we cannot use the vi-style movement commands inside the REPL.
This is no Geiser, but it makes Nvim a much more viable platform for Guile
development. What I am missing is the ability to syntax-highlight the prompt
and messages from the REPL like the backtrace. Is there a documentation on what
format those follow, so I can use a regex to match them without matching Scheme
code as a false positive?
I hope you like what you what I made, even if I’m sure most of you will keep
using Emacs :)
PS: Nvim (formerly known as Neovim) is a fork of Vim. There are a number of
goals, but the biggest one is cleaning out the codebase, allowing plugins in
any language to be written, completely revamp how GUIs are written (GUIs are
now essentially plugins), improve performance, allow asynchronous job control,
allow for Nvim to be embedded in other applications, and even more things that
I can’t remember off the top of my head.
https://neovim.io/charter/
It works great and I haven’t had a reason to go back to Vim at all. This sort
of plugin would have been plain impossible in Vim.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- A REPL plugin for Nvim,
Alejandro Sanchez <=