Home

Awesome

<!-- markdownlint-disable --> <br /> <div align="center"> <a href="https://github.com/nvim-neorocks/rocks-git.nvim"> <img src="./rocks-header.svg" alt="rocks-git.nvim"> </a> <p align="center"> <br /> <a href="./doc/rocks-git.txt"><strong>Explore the docs »</strong></a> <br /> <br /> <a href="https://github.com/nvim-neorocks/rocks-git.nvim/issues/new?assignees=&labels=bug">Report Bug</a> · <a href="https://github.com/nvim-neorocks/rocks-git.nvim/issues/new?assignees=&labels=enhancement">Request Feature</a> · <a href="https://github.com/nvim-neorocks/rocks.nvim/discussions/new?category=q-a">Ask Question</a> </p> <p> <strong> Use <a href="https://github.com/nvim-neorocks/rocks.nvim/">rocks.nvim</a> to install plugins from git! </strong> </p> </div> <!-- markdownlint-restore -->

LuaRocks

:star2: Summary

rocks-git.nvim extends rocks.nvim with the ability to install plugins from git repositories.

It does so by hooking into the :Rocks {install|update|sync|prune} commands, allowing you to add plugins entries to your rocks.toml as follows:

[plugins.neorg]
git = "nvim-neorg/neorg"

# or...

[plugins]
neorg = { git = "nvim-neorg/neorg" }

[!IMPORTANT]

This plugin is meant as a simple, minimal bridge for plugins that cannot be installed with luarocks.

For Lua plugins, we recommend requesting (or creating a PR) to upload them to luarocks, as this enables proper SemVer versioning.

:pencil: Requirements

:hammer: Installation

Simply run :Rocks install rocks-git.nvim, and you are good to go!

:books: Usage

You can use the same :Rocks {install|update|sync|prune} commands as you would use to install rocks with rocks.nvim.

The only difference is the :Rocks install {plugin} {args?} command.

Arguments:

If a plugin is not pinned to a revision or tag with the rev field, :Rocks sync will update to the most recent tag.

Configuration options

The following fields can be set in a rocks.toml entry that is managed by this plugin:

FieldTypeRequired?Description
namestringYesName of the plugin
gitstringYesGit short name1, e.g. "nvim-neorocks/rocks-git.nvim" or a git URL.
optbooleanNo (default: false)Plugins with opt = true will not be loaded on startup. See :h packadd
revstringNoGit revision or tag to checkout
branchstringNoGit branch to checkout
buildstringNoShell or Vimscript command to run after install/update. Will run a vim command if prefixed with :

[!TIP]

See also :h rocks-git.

:stethoscope: Troubleshooting

Git commands and error logs will show up in :Rocks log.

:book: License

rocks-git.nvim is licensed under GPLv3.

:green_heart: Contributing

Contributions are more than welcome! See CONTRIBUTING.md for a guide.

Footnotes

  1. Also supports github:, gitlab:, codeberg: and sourcehut: prefixes, e.g. gitlab:owner/repo (HTTPS only). 2