-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Oleksii Lisikh edited this page Feb 19, 2026
·
3 revisions
Welcome to the neotest-scala documentation.
- Installation — Setup with lazy.nvim, packer, or manual
- Configuration — Args, dynamic configuration, and options
- Supported Test Libraries — Overview of all 5 supported libraries
- ScalaTest — FunSuite, FreeSpec, AnyFlatSpec patterns
- munit — ScalaTest-style syntax with munit
- specs2 — Mutable Specification patterns
- utest — Lightweight testing with utest
- zio-test — ZIO's built-in testing framework
- Debugging — nvim-dap integration with Metals
- Troubleshooting — Common issues and solutions
- Contributing — How to add support for new test libraries
A Neotest adapter for running Scala tests directly from Neovim.
- 5 Test Libraries Supported: ScalaTest, munit, specs2, utest, zio-test
- Treesitter-based Test Discovery: Automatically detects tests in your Scala files
- Metals Integration: Uses nvim-metals for project metadata and build target detection
- Debugging Support: Debug tests with nvim-dap integration
- Flexible Configuration: Custom args, dynamic configuration callbacks
| Library | Style | Single Test Debug |
|---|---|---|
| ScalaTest | BDD, FunSuite, FreeSpec | ✅ Yes |
| munit | ScalaTest-style | ✅ Yes |
| specs2 | Specification-based | ✅ Yes |
| utest | Lightweight | ❌ No |
| zio-test | ZIO effects | ✅ Yes |
require("neotest").setup({
adapters = {
require("neotest-scala")
}
})Then use Neotest commands to run tests:
:Neotest run " Run nearest test
:Neotest run file " Run all tests in file
:Neotest summary " Open test summary| Requirement | Purpose |
|---|---|
| Neovim 0.8+ | Core editor |
| neotest | Test runner framework |
| nvim-metals | Scala LSP for project metadata |
| sbt | Build tool for running tests |
| Treesitter Scala | Test discovery |
See Installation for detailed setup instructions.
This is a fork of the original neotest-scala by Stevan Milic. Huge thanks for creating and maintaining the original plugin.