๐Ÿ“ฆ yochem / lazy-vimpack

Use the Lazy.nvim spec with Nvim's built-in package manager

โ˜… 3 stars โ‘‚ 0 forks ๐Ÿ‘ 3 watching
๐Ÿ“ฅ Clone https://github.com/yochem/lazy-vimpack.git
HTTPS git clone https://github.com/yochem/lazy-vimpack.git
SSH git clone git@github.com:yochem/lazy-vimpack.git
CLI gh repo clone yochem/lazy-vimpack
Yochem van Rosmalen Yochem van Rosmalen feat: load plugins from directory c9cffa6 6 months ago ๐Ÿ“ History
๐Ÿ“‚ main View all commits โ†’
๐Ÿ“ lua
๐Ÿ“„ README.md
๐Ÿ“„ test.lua
๐Ÿ“„ README.md

Lazy-vimpack

[!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.

Usage

-- 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' },
})

Features

Table legend:

  • โœ…: Implemented (not covering all edge cases what so ever)
  • โž–: Not yet implemented, but should be added
  • โŒ: Probably won't implement, out of scope
Spec PropertyImplementedDetails
[1]โœ…
Use full url, owner/repo format not supported. | dir | โœ… | Not handled by 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 | โŒ |

Disclaimer

This project is in no way associated with Lazy.nvim. All credits for designing the Lazy spec go to @folke.