Skip to content

TheMagSec/gpack.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gpack.nvim

gpack.nvim is a plugin manager for Neovim that allows you to easily install, update, and manage plugins. It is designed to install plugins into the pack folder, next to your Neovim configuration files. This allows for transportability of your entire setup (config + plugins). Plugins are installed as git-bare repositories, which means they are cloned into a bare repository and then checked out into a working directory. This approach allows for efficient updates and reduces the amount of disk space required for plugins. Additionally, a cleanup step will remove all known repository maintenance files.

Note

This plugin is still in development and may not be fully functional. It is modeled after the original implementation of vim.pack (Neovim 0.12).


Installation

Clone this repository into your pack folder:

git clone https://github.com/themagsec/gpack.nvim.git ~/.config/nvim/pack/core/start/gpack.nvim

In your init.lua config file, add the following line:

vim.gpack = require('gpack')

Usage

vim.gpack.add({
      -- Install 'plugin1' and use default branch (usually `main` or `master`)
      'https://github.com/user/plugin1',
      
      -- Same as above, just using default abbreviation (for Github)
      'user/plugin2',
      
      -- Same as above, but using a table (allows setting other options)
      { src = 'https://github.com/user/plugin1' },

      -- Specify plugin's name (here the plugin will be called 'plugin2'
      -- instead of 'generic-name')
      { src = 'https://github.com/user/generic-name', name = 'plugin2' },

      -- Specify version to follow during install and update
      {
        src = 'https://github.com/user/plugin3',
        -- Version constraint, see |vim.version.range()|
        version = vim.version.range('1.0'),
      },
      {
        src = 'https://github.com/user/plugin4',
        -- Git branch, tag, or commit hash
        version = 'main',
      },
    })

    -- Plugin's code can be used directly after `add()`
    plugin1 = require('plugin1')

Note

For more detailed help, run :help gpack.nvim.


Features

  • add/install Package via vim.gpack.add
  • add/install Package via command :GPack add
  • remove Package via command :GPack remove
  • Package updates via command : GPack update
  • Package info via command : GPack info
  • Package list via command : GPack list
  • upgrade gpack.nvim via command : GPack upgrade

About

Opinionated package manager for neovim

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages