Use the Lazy.nvim spec with Nvim's built-in package manager
https://github.com/yochem/lazy-vimpack.git
[!WARNING]
Just for fun, don't expect anything stable.
This plugin is a small wrapper around Nvim's native package manager vim.pack
that allows to define plugins as Lazy.nvim Spec.
This includes lazy-loading, local plugins, and more.
[!IMPORTANT]
This is not a full replacement for Lazy.nvim. Lazy.nvim is an incredible
piece of software that does way more than just providing lazy-loading
options. Don't expect this to be a full Lazy.nvim replacement, but rather a
familiar way to register your plugins.
-- in your init.lua
vim.pack.add({ { src = 'https://github.com/yochem/lazy-vimpack' } })
require('lazy-vimpack').add({
{
'https://github.com/yochem/jq-playground.nvim',
opts = {
cmd = { 'yq' }
}
},
{
'https://github.com/luukvbaal/statuscol.nvim',
main = 'statuscol',
init = function ()
vim.o.number = true
vim.o.relativenumber = true
end,
config = function()
local builtin = require('statuscol.builtin')
require('statuscol').setup({
relculright = true,
ft_ignore = { 'qf' },
segments = {
{ sign = { maxwidth = 1, colwidth = 1 }, click = 'v:lua.ScSa' },
{ text = { builtin.foldfunc, ' ' }, click = 'v:lua.ScFa' },
{ text = { builtin.lnumfunc }, click = 'v:lua.ScLa' },
{
sign = { namespace = { 'gitsign' }, fillchar = 'โ', fillcharhl = '@comment' },
click = 'v:lua.ScSa',
},
},
})
end
},
'https://github.com/folke/trouble.nvim',
{ 'https://github.com/mcauley-penney/visual-whitespace.nvim', event = 'ModeChanged' },
{ 'https://github.com/nvim-treesitter/nvim-treesitter', version = 'master' },
})
Table legend:
| Spec Property | Implemented | Details |
|---|---|---|
| [1] | โ |
vim.pack but appended to rtp.
| url | โ
| Use src of vim.pack.Spec.
| name | โ
| name of vim.pack.Spec.
| dev | โ |
| dependencies | โ
|
| enabled | โ
| Same as cond.
| cond | โ
| Same as enabled.
| priority | โ |
| init | โ
|
| opts | โ
| Requires main to be set.
| config | โ
|
| main | โ
| Required when using opts.
| build | โ |
| lazy | โ |
| event | โ
|
| cmd | โ |
| ft | โ
|
| keys | โ |
| branch | โ
| Use version of vim.pack.Spec.
| tag | โ
| Use version of vim.pack.Spec.
| commit | โ
| Use version of vim.pack.Spec.
| version | โ
| version of vim.pack.Spec.
| pin | โ
|
| submodules | โ |
| optional | โ |
| specs | โ |
| module | โ |
| import | โ |
This project is in no way associated with Lazy.nvim. All credits for designing the Lazy spec go to @folke.