Skip to content

Latest commit

 

History

History
119 lines (73 loc) · 2.83 KB

CONTRIBUTING.md

File metadata and controls

119 lines (73 loc) · 2.83 KB

Contributing guide

Contributions are more than welcome!

Commit messages / PR title

Please ensure your pull request title conforms to Conventional Commits.

CI

Our CI checks are run using nix.

Development

Dev environment

We use the following tools:

Formatting

Linting

Static type checking

Nix devShell

  • Requires flakes to be enabled.

We provide a flake.nix that can bootstrap all of the above development tools.

To enter a development shell:

nix develop

To apply formatting, while in a devShell, run

pre-commit run --all

If you use direnv, just run direnv allow and you will be dropped in this devShell.

Running tests

We use busted for testing, but with Neovim as the Lua interpreter.

The easiest way to run tests is with Nix (see below).

If you do not use Nix, you can also run the test suite using luarocks test. For more information on how to set up Neovim as a Lua interpreter, see

Or

Note

The Nix devShell sets up luarocks test to use Neovim as the interpreter.

Running tests and checks with Nix

If you just want to run all checks that are available, run:

nix flake check -L --option sandbox false

To run tests locally, using Nix:

nix build .#checks.<your-system>.integration-nightly -L --option sandbox false

For example:

nix build .#checks.x86_64-linux.integration-nightly -L --option sandbox false

For formatting and linting:

nix build .#checks.<your-system>.pre-commit-check -L

For static type checking:

nix build .#checks.<your-system>.type-check-nightly -L

Manual testing

If you want to test your contributions to rocks.nvim manually, we recommend you set NVIM_APPNAME to something other than nvim, so that your test environment doesn't interfere with your regular Neovim installation.

We also provide a Nix flake output that you can use to test-drive rocks.nvim:

nix run .#neovim-with-rocks

It sets NVIM_APPNAME to nvimrocks.