Skip to content

theJian/packman.lua

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

packman

test

Getting Started

Prerequisites

  • Neovim(>= 4.0)
  • Git

Installing

The whole plugin is just a lua file. Run this command to install or update packman.

$ curl https://raw.githubusercontent.com/theJian/packman.lua/master/packman.lua -o $HOME/.config/nvim/lua/packman.lua

Configure packman by adding just one single line to your init.vim

lua require 'packman'

That's it! Unlike other plugin managers, which are typically reading plugin list from init.vim, packman takes a different approach. Keep reading!

Adding/Removing plugins

Packman exposes several methods that you can use to add or remove plugins. To access them you can use :lua command.

For example, this command will install a plugin from a git remote url. Don't forget the surrounding quotes!

:lua packman.get "plugin_git_remote_url"

If plugin is hosted on github, you can simply use username/plugin

:lua packman.get "username/plugin"

To remove a installed plugin, pass the exact plugin name to packman.remove.

:lua packman.remove "plugin"

Updating plugin

:lua packman.update "plugin"

Synchronizing plugin list

Since plugin list isn't part of the init.vim file, we can't keep plugins in sync by syncing the configuration. Pacman reads plugin list from a individual file and can generate this file from installed plugins.

:lua packman.dump()

By default a file packfile will be generated at the same directory with where packman file is located in. If you follow the installation instruction then it can be found under $HOME/.config/nvim/lua.

Then you can sync packfile and install plugins from it. It reads from the same filename as the output file of dump method.

:lua packman.install()

Functions

get(source)

Add a plugin.

source is a git url where the plugin can be fetched from. A short form (username/repo) indicates it is from Github.

update([name])

Update plugins.

name is the name of the plugin to be updated. If it is omitted, all plugins will be updated.

remove([name])

Remove plugins.

name is the name of the plugin to be removed. If it is omitted, all plugins will be removed.

install([packfile])

Install plugins from a packfile.

packfile is pathname of a packfile. packfile is optional, if it is omitted default pathname({directory_of_packman_lua}/packfile}) will be used.

dump([packfile])

Generate a packfile from installed plugins.

packfile is pathname of output file. If it is omitted default pathname({directory_of_packman_lua}/packfile}) will be used.

clear()

Remove all installed plugins.

list()

Print a list of installed plugins.

About

nvim package management library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published