Skip to content

Plugins

Matěj Cepl edited this page Mar 18, 2020 · 38 revisions

A Lua based editor extension API is provided for in-process plugin development.

Installing a Plugin

Plugins are loaded using require(name) from your visrc.lua configuration file, leveraging the standard Lua module system. The used runtime paths can be displayed using :help "Lua paths", the lookup order is also documented in the manual page.

-- load standard vis runtime files, must be done before anything else
require('vis')
-- load plugin called `<name>` (notice the omission of the `.lua` file extension)
require('<name>')

-- the remainder of your visrc.lua configuration file

Plugin Conventions

Consider keeping your plugin in a git repo with the name vis-<name>.

Consider naming your main script init.lua, so we are able to require the containing directory.

Consider cloning or linking your plugin folder to .config/vis/plugins, so from visrc.lua you'd call require 'plugins/my_plugin.

Existing Plugins

A few standard plugins are included in the main repository.

Below is a list of externally developed plugins, the quality of which may vary:

If you have written an extension for vis, you can share it on the list above.

You can’t perform that action at this time.