{"id":13896165,"url":"https://github.com/erf/vis-plug","last_synced_at":"2025-07-17T12:30:59.062Z","repository":{"id":52721769,"uuid":"238709520","full_name":"erf/vis-plug","owner":"erf","description":"A minimal plugin-manager for vis","archived":false,"fork":false,"pushed_at":"2025-01-05T20:13:59.000Z","size":180,"stargazers_count":24,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-15T04:00:32.623Z","etag":null,"topics":["lua","package-management","plugin","plugin-manager","theme","vis","vis-plug"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/erf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-02-06T14:38:58.000Z","updated_at":"2025-05-19T12:50:39.000Z","dependencies_parsed_at":"2023-01-28T23:16:10.435Z","dependency_job_id":null,"html_url":"https://github.com/erf/vis-plug","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/erf/vis-plug","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fvis-plug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fvis-plug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fvis-plug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fvis-plug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/erf","download_url":"https://codeload.github.com/erf/vis-plug/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/erf%2Fvis-plug/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265606603,"owners_count":23796969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["lua","package-management","plugin","plugin-manager","theme","vis","vis-plug"],"created_at":"2024-08-06T18:02:42.231Z","updated_at":"2025-07-17T12:30:59.057Z","avatar_url":"https://github.com/erf.png","language":"Lua","readme":"# vis-plug 🍜\n\nA minimal plugin-manager for [vis](https://github.com/martanne/vis)\n\n`vis-plug` plugins are defined by a Lua file in a git repository and can be both a [plugin](https://github.com/martanne/vis/wiki/Plugins) or a [theme](https://github.com/martanne/vis/wiki/Themes).\n\n[Configure](#Configure) plugins in your `visrc` and use [Commands](#Commands) to install and more.\n\nPlugins are installed using `git` (in the background) to a cache folder and required on `init`.\n\n## Install\n\ngit clone `vis-plug` and require it in your `visrc`.\n\nYou can use this one-liner to install `vis-plug` and then require it in your `visrc`:\n\n```sh\n[ -n \"${XDG_CONFIG_HOME:-$HOME}\" ] \u0026\u0026 [ -d \"${XDG_CONFIG_HOME:-$HOME/.config}/vis/plugins\" ] \u0026\u0026 git clone https://github.com/erf/vis-plug.git \"${XDG_CONFIG_HOME:-$HOME/.config}/vis/plugins/vis-plug\" || echo \"Error: The plugin path could not be determined or does not exist. Ensure XDG_CONFIG_HOME or HOME is set and that the path exists.\"\n```\n\nAlternatively, you can add the following to your `visrc` to automatically fetch `vis-plug` to your plugins folder and require it:\n\n```lua\nlocal plug = (function() if not pcall(require, 'plugins/vis-plug') then\n \tos.execute('git clone --quiet https://github.com/erf/vis-plug ' ..\n\t \t(os.getenv('XDG_CONFIG_HOME') or os.getenv('HOME') .. '/.config')\n\t \t.. '/vis/plugins/vis-plug')\nend return require('plugins/vis-plug') end)()\n```\n\n## Configure\n\nConfigure plugins in your `visrc` as a list of tables given to the `plug.init` method.\n\nExample:\n\n```Lua\n\nlocal plug = require('plugins/vis-plug')\n\n-- configure plugins in an array of tables with git urls and options\nlocal plugins = {\n\n\t-- load a plugin given a repo (https://github.com/ can be omitted and expects a 'init.lua' file)\n\t{ 'erf/vis-cursors' },\n\n\t-- first parameter is a shorthand for 'url'\n\t{ url = 'erf/vis-cursors' },\n\n\t-- specify the lua file to require (or theme to set) and give a ref (commit, branch, tag) to checkout\n\t{ 'erf/vis-test', file = 'test', ref = 'some-branch' },\n\n\t-- specify an alias to later use to access plugin variables (see example below)\n\t{ 'erf/vis-highlight', alias = 'hi' },\n\n\t-- configure themes by setting 'theme = true'. The theme 'file' will be set on INIT\n\t{ 'samlwood/vis-gruvbox', theme = true, file = 'gruvbox' },\n}\n\n-- require and optionally install plugins on init\nplug.init(plugins, true)\n\n-- access plugins via alias\nplug.plugins.hi.patterns[' +\\n'] = { style = 'back:#444444' }\n```\n\nEach plugin table can have the following options:\n\n- `url` - the url to the git repo (`https://github.com or https://` can be omitted)\n- `file` - the relative path to the lua file (defaults to `init`, skip the `.lua` part) (optional)\n- `ref` - checkout a spesific commit, branch or tag (optional)\n- `alias` - access plugins via `plug.plugins.{alias}` (optional)\n- `theme` - set `theme = true` if theme; will set theme on INIT event (optional)\n\n### Install on init\n\nPass _true_ as second argument to `init` to install on init.\n\n```Lua\nrequire('plugins/vis-plug').init(plugins, true)\n```\n\n### Install path\n\nPlugins are installed (cloned) to the following path (in this order):\n\n`(VIS_PLUG_HOME|(XDG_CACHE_HOME|HOME/.cache)/vis-plug)/{plugins|themes}`\n\nUse `plug.path` to set a custom install path:\n\n```Lua\nplug.path('/Users/user/my-plugins')\n```\n\n### Themes\n\nInstall themes using the `{ theme = true, file = 'somepath/theme-file' }` option (don't include .lua)\n\nThe first theme in the config table is set on the `INIT` event.\n\nExample theme:\n\n```\nlocal plugins = {\n\t{ 'timoha/vis-acme', theme = true, file = 'acme' },\n}\n```\n\n## Commands\n\nWe support the following `vis` commands:\n\n`:plug-list` - list plugins and themes\n\n`:plug-install` - install plugins (git clone)\n\n`:plug-update` - update outdated plugins (git pull)\n\n`:plug-outdated` - check if plugins are up-to-date\n\n`:plug-upgrade` - upgrade to latest vis-plug using git pull\n\n`:plug-remove` - delete plugin by {name} (`:plug-list` for names)\n\n`:plug-clean` - delete all plugins from disk\n\n`:plug-checkout` - checkout {name} {commit|branch|tag}\n\n`:plug-commands` - list commands (these)\n\n## vis-plugins\n\nI've created [vis-plugins](https://github.com/erf/vis-plugins) - a web page with is a list of plugins and themes based on the [vis wiki](https://github.com/martanne/vis/wiki).\n\nIt's hosted by github at [https://erf.github.io/vis-plugins](https://erf.github.io/vis-plugins)\n","funding_links":[],"categories":["Lua"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Fvis-plug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ferf%2Fvis-plug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ferf%2Fvis-plug/lists"}