- Make some changes to files in your git repo
- Open Neovim
- Run
:lua require('diff-review').setup() - Run
:DiffReview
You should see:
- Left panel: List of changed files with status indicators (M/A/D)
- Right panel: Diff view of the selected file
- Press
j/kto navigate between files - Press
Enterto select a file and view its diff - Press
qto close the window - Press
rto refresh the file list
Tests are written using plenary.nvim.
Run all tests:
task testRun a specific test file:
task test-file -- tests/config_spec.lua-
tests/config_spec.lua- Configuration module tests- Default status symbols and highlights
- Custom configuration merging
- Partial overrides
- Backwards compatibility
-
tests/file_list_spec.lua- File list status icon tests- Default status icon behavior
- Custom symbols (brackets, longer text)
- Custom highlight groups
- Fallback behavior
The first time you run tests, plenary.nvim will be automatically cloned to /tmp/plenary.nvim. To clean up:
task clean-testTest files should be placed in tests/ and follow the naming convention *_spec.lua. Use plenary's describe and it blocks:
local my_module = require("diff-review.my_module")
describe("my_module", function()
it("should do something", function()
assert.equals("expected", my_module.do_something())
end)
end)