Regexp Railroad Diagrams?

Hello!

I’m a refugee from Atom and I’ve been thoroughly enjoying my experience with Neovim so far. I’m down so a scant few of my favourite Atom features I’ve yet to find answers for with nvim. One of those features is atom-regex-railroad-diagrams. With this atom plugin installed, any time the cursor is on a regular expression, a graphical railroad diagram appears at the bottom of the window.

Is there something comparable for neovim? Surely, terminal-based plugins would have to use ascii art or something like that, but perhaps something could be done anyways?

Some cursory googling didn’t turn up much, there’s too much history with vim and regexp search terms to break through the noise of ‘how to regexp in vim’ tutorials.

Thanks for your interest in this topic

1 Like

Hi!
I’m not aware of any plugin like that for neovim, but I’ll use it :slight_smile:
neovim gives you some regex feedback via inccommnad (see :h inccommand) Not what you are asking for, but better than nothing.

In case you don’t know about it, there is GitHub - nvim-lua/wishlist: A public catalogue of Lua plugins Neovim users would like to see exist , where people ask for plugins. In the past I found some nice plugins thanks to it. I just took a look, but I didn’t see any regex plugin.

1 Like

Thanks

See also [question]: text output? · Issue #94 · tabatkins/railroad-diagrams · GitHub

1 Like

I’m thinking this may be doable with terminals supporting kitty image protocol via GitHub - edluffy/hologram.nvim: 👻 A cross platform terminal image viewer for Neovim. Extensible and fast, written in Lua and C. Works on macOS and Linux.