Skip to content

gio-nvim/lazily-nvim

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Lazily-nvim

A standalone plugin lazy loader.

Overview

Lazily is one third1 of a full package manager: it only does lazy loading of the plugins. This plugin is intended for use with lightweight package managers such as minpac or paq, or even native vim packages.

This plugin requires Neovim 0.7.0.

Usage

local lazily = require("lazily")

-- This is optional. Use it to specify extra options.
lazily.setup{
    -- Default uses vim8 packages. This works with minpac and paq
    load = lazily.packadd;
    -- To search packages in a specified directory use
    load = lazily.pathadd(vim.fn.stdpath("data") .. "/plugins");
    -- To use it with packer (though why would you do that?)
    load = packer.use;
}

lazily.use("my-plugin", {
    autocmd = {
        event = {"BufEnter", "BufNew"};
        pattern = "*";
        filter = function(event)
            return vim.fn.isdirectory(event.match) == 1
        end;
    },
    command = "MyPlugin",
    mapping = {"n", "<leader>mp"},
    requires = {
        "my-other-plugin",
    },
})

-- To ensure the plugin is loaded, use
lazily.load("my-plugin")

-- To cancel all the lazy loading triggers, use
lazily.cancel("my-plugin")

See :help lazily for more informations.

Footnotes

  1. The three thirds are downloading, loading and lazy-loading.

About

A standalone plugin lazy loader for Neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Lua 100.0%