Skip to content

nvim-plugnplay/plugnplay.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

plugnplay.nvim

The ultimate Neovim plugin ecosystem

✨Planned Features

  • Install plugins easily
  • Configuration in a .jsonc file
  • Sane defaults for plugins
  • Automatically set up plugins by only giving a repo address
  • Automatically detect "dead" plugins
  • Easy lazy loading

📦Installation

Put the following code in your config to bootstrap plugnplay:

local plugnplay_path = vim.fn.stdpath("data") .. "/site/pack/plugnplay/opt/plugnplay.nvim"

if vim.fn.empty(vim.fn.glob(plugnplay_path)) > 0 then
  vim.notify("Bootstrapping plugnplay.nvim, please wait ...")
  vim.fn.system({
    "git",
    "clone",
    "https://github.com/nvim-plugnplay/plugnplay.nvim",
    plugnplay_path,
  })
end

-- Load plugnplay
vim.cmd([[ packadd plugnplay.nvim ]])
local plugnplay = require("plugnplay")

Configuration

You configure plugins in the cfg.jsonc file. The structure of a config is like this:

{
    "plugnplay": {
        // Configuration for plugnplay goes here
    },

    // Plugins we want to auto-configure
    "auto-config": [
        "neorg",
        "something-else"
    ],

    // Similar to "auto-config" except we actually need to supply our own configuration
    "plugins": {
        {
            "meta": {
                "version": "0.1.0",
                "authors": ["Shift"],
                "description": "Config powered with plugnplay.nvim",
            },
            "options": {
                "pnp-version": "0.1.0", // Last compatible pnp version
                // here goes some pnp config
            },
            "dependencies": {
                "neorg": {
                    "github": "nvim-neorg/neorg",
                    "branch": "unstable",
                    "config": "config.neorg",
                },
                "mappy": {
                    "path": "~/.code/lua/mappy",
                    "config": "general.maps",
                }
            }
        }
    },

    // For entries that are not present in our database
    "custom": {
        "something": "a/url", // The value can be simply a string
        "something": { // Or it can be a table
            "url": "a/url", // The URL value must be supplied
            "configuration": { // A configuration table is optional
                "key": "value"
            }
        }
    }
}

For plugin developers

You should create a plugin.json file in your repositories. See for more info.

Releases

No releases published

Packages

No packages published

Languages