aboutsummaryrefslogtreecommitdiffstats

dep

This readme is a work in progress.

A versatile, declarative and correct neovim package manager in Lua. Originally written for personal use by luaneko.

What does that mean?

  1. versatile - packages can be declared in any Lua file in any order of your liking.
  2. declarative - packages are declared using simple Lua tables.
  3. correct - packages are always loaded in a correct and consistent order.

See also squibid's neovim-configs for an example of how dep can be used in practice.

Requirements

Setup

  1. Create lua/bootstrap.lua in your neovim config directory.
  1. In init.lua, call dep with an array of package specifications.

Commands

  • :DepSync - installs new packages, updates packages to the latest versions, cleans removed packages and reloads packages as necessary.
  • :DepClean - cleans removed packages.
  • :DepReload - reloads all packages.
  • :DepList - prints the package list, performance metrics and dependency graphs.
  • :DepLog - opens the log file.
  • :DepConfig - opens the file that called dep, for convenience.

Package specification

A package must be declared in the following format.

When a string is given where a package specification table is expected, it is assumed to be the package's full name.

A package can be declared multiple times. Multiple declarations of the same package are combined into one. This is useful when declaring dependencies, which is explored later.

Declaring dependencies

The dependencies and dependents declared in a package specification are themselves package specifications. If a dependency or dependent is declared multiple times, they are combined into one just like normal package specifications.

If dep detects a circular dependency cycle, it reports the problematic packages instead of hanging or crashing.

A dependency can be marked as disabled, which disables all dependents automatically.

If a dependency fails to load for some reason, all of its dependents are guaranteed to not load.

Miscellaneous configuration

dep accepts configuration parameters as named fields in the package list.

License

dep is licensed under the MIT License.