Thanks for your interest in contributing! 🎊
For small changes, feel free to open a PR directly. For larger changes, open an issue first to discuss the feature or bug.
To get your PR merged, you are expected to:
- Read this document
- Run the formatter before every commit
- Open a draft PR early to avoid duplicated work
You will need:
- Java JDK 17 or 21
- The following tools available in your terminal:
- pre-commit (https://pre-commit.com/#install)
stylualuacheckmakegitlx(https://lux.lumen-labs.org/) — for package management (lux.tomlis the single source of truth for the luarocks package)
Set up your environment by running:
makeThis command will:
- Clone neotest and nvim-treesitter
- Install the Java parser for nvim-treesitter
- Build the Java projects (some failing tests are expected)
- Run the neotest-java test suite
The project includes both unit tests and end-to-end (E2E) tests.
Unit tests:
# Run all unit tests
make test
# Run a single test file
./scripts/test [path-to-test-file]You can also run unit tests from within Neovim using neotest-plenary.
Note: you will need to specify the path to
.../neotest-java/tests/testrc.vimin the neotest-plenary configuration. See nvim-neotest/neotest-plenary#13
E2E tests:
# Run E2E tests
make test-e2e
# Run all tests
make test && make test-e2eE2E test requirements:
- Java JDK 17 or 21
JAVA_HOMEenvironment variable set- Maven wrapper (included in the test fixture)
See tests/e2e/README.md for detailed E2E test documentation.
Rebuilding after Java changes:
If you change Java source files, rebuild before running tests:
make clean && makeThis project uses Lux
for Lua package management. lux.toml is the single
source of truth — lx upload generates the rockspec
from it when publishing to
luarocks.org.
# Install/sync dependencies into .lux/
make lux-sync
# Build the project
make lux-build
# Lint via lux (luacheck)
make lux-lint
# Run the test suite via lux (delegates to `make test`)
make lux-testlux.lock is committed for reproducible installs.
.lux/ (local build tree) and generated *.rockspec
files are gitignored — never commit them.