- Core Lua modules live in
lua/gitsigns/(config, handlers, utilities). - Repo maintenance scripts live in
scripts/. - User-facing commands are wired in
plugin/gitsigns.vim - Help files under
doc/get regenerated byscripts/gen_help.lua. - Specs plus fixtures sit in
test/, relying on helpers intest/gs_helpers.lua. - Tooling binaries (Stylua, nvim-test, EmmyLua) are cached in
deps/.
make build: run Stylua overlua/,test/, andscripts/, then regenerate help files before committing.make test [FILTER=pattern]: execute the functional suite via nvim-test with the default Neovim runner.make doc/make doc-check: regenerate help fromlua/gitsigns/config.luaand fail if docs drift.make format-checkormake format: lint or autoformat Lua sources.make emmylua-check: run optional static analysis after fetching the analyzer.- Read
etc/testing.mdfor the test matrix, test-selection guidance, and troubleshooting notes.
- Lua code must have emmylua/LuaCATS type annotations
- 2-space indentation, 100-character columns, single quotes for strings.
- Run
make formatandmake emmylua-checkafter changing any code - When creating simple util functions. Use Neovim's
:helpcommand to see if anything already exists.
- Add or update tests for risky, non-obvious, or broad changes; see
etc/testing.mdfor details.
- Read
etc/commit-message.mdbefore creating or amending commits. - Read
etc/pull-request.mdbefore pushing a branch or opening a PR. - Ensure
make build, the relevantmake test-*, andmake doc-checkall pass locally. - Treat failed required local checks as blocking unless the user explicitly approves proceeding with known failures.