This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
Quicktest is a Neovim plugin that enables contextual test execution with real-time feedback. It supports multiple testing frameworks through an adapter system and provides both split window and popup interfaces for viewing test results.
make test- Run the test suite using Plenary- Tests are located in
tests/directory - Test configuration:
tests/minimal_init.lua
stylua --check --glob '**/*.lua' -- lua- Check Lua code formattingstylua --glob '**/*.lua' -- lua- Auto-format Lua code- CI runs stylua checks on all pull requests
lua/quicktest.lua- Main module entry point with setup and public APIlua/quicktest/module.lua- Core functionality, adapter management, and test executionlua/quicktest/ui.lua- Window management (split/popup) and display logicplugin/quicktest.lua- Vim plugin initialization and command definitions
The plugin uses a modular adapter architecture in lua/quicktest/adapters/:
- Each adapter (
golang/,vitest/,playwright/, etc.) implements theQuicktestAdapterinterface - Adapters define test parameter building for different run types (line, file, dir, all)
- Each adapter has
build_*_run_paramsfunctions and arunfunction that executes tests - Adapters can use TreeSitter queries for parsing test structures (see
query.luafiles)
lua/quicktest/fs_utils.lua- File system utilities for finding test files and directorieslua/quicktest/ts.lua- TreeSitter integration for parsing test codelua/quicktest/colored_printer.lua- ANSI color support for test outputlua/quicktest/notify.lua- Notification system
- User triggers test run (line/file/dir/all)
- Module determines appropriate adapter based on buffer and configuration
- Adapter builds run parameters using TreeSitter parsing or file analysis
- Test command executes via Plenary Job with real-time output streaming
- Results display in split window or popup with live scrolling and ANSI colors
When creating new adapters:
- Implement the
QuicktestAdapterinterface inlua/quicktest/adapters/[name]/init.lua - Use TreeSitter queries in
query.luafiles for test parsing when applicable - Follow existing patterns in
golang/orvitest/adapters - Test adapter functionality with example projects in
tests/support/
:QuicktestRunLine [mode] [adapter] [...args]- Run test at cursor:QuicktestRunFile [mode] [adapter] [...args]- Run all tests in file:QuicktestRunDir [mode] [adapter] [...args]- Run tests in directory:QuicktestRunAll [mode] [adapter] [...args]- Run all tests in project
require('quicktest').run_line(mode)- Run test at cursor positionrequire('quicktest').run_file(mode)- Run file testsrequire('quicktest').run_dir(mode)- Run directory testsrequire('quicktest').run_all(mode)- Run all project testsrequire('quicktest').run_previous(mode)- Rerun last testrequire('quicktest').toggle_win(mode)- Toggle test windowrequire('quicktest').cancel_current_run()- Cancel running test
Modes: 'split', 'popup', or omit for auto-detection.