Skip to content

statusfailed/metacat.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

metacat.nvim

Render diagrams from a metacat file from nvim. Assumes metacat-cli is installed.

To configure using Lazy.nvim, add this to plugins.lua:

{
  "statusfailed/metacat.nvim",
  opts = {
    viewer = { "svgtail" },
  },
},

Then bind the render method to a key (e.g. F6 below) by adding the following to init.lua:

vim.keymap.set("n", "<F6>", require("metacat").render, { desc = "Metacat: render def-arrow as SVG" })

Configuration

The configuration above uses svgtail to render SVGs. You can use other programs by setting the viewer opt, e.g. for feh:

viewer = { "feh", "--reload", "1" }

viewer should be a command which:

  • Launches with the path to an SVG as its final argument
  • Will auto-reload the file when the file path changes

See also

About

view metacat terms as diagrams from within nvim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages