Contributing to sort.nvim

August 25, 2025 ยท View on GitHub

Contributions welcome! Before submitting:

  • Follow existing code style
  • Install pre-commit hooks (pip install pre-commit && pre-commit install)
  • Write clear commit messages
  • Add tests for new functionality
  • Run tests before submitting

Development Setup

Install pre-commit hooks:

pip install pre-commit
pre-commit install

Hooks automatically format/lint Lua and shell files using stylua, shfmt, shellcheck, and selene.

Manual tool installation

ToolInstall command
styluacargo install stylua
shfmtgo install mvdan.cc/sh/v3/cmd/shfmt@latest
selenecargo install selene

Running tests

To run the test suite:

./scripts/test

Use the -v or --verbose flag for detailed output:

./scripts/test --verbose