Skip to content

7.Contributing

yousefhadder edited this page Dec 1, 2025 · 1 revision

Contributing & Development

Contributions are welcome! We encourage direct collaboration - you can open issues and pull requests directly to this repository.

  • πŸ› Bug Reports: Please include steps to reproduce and your Neovim version
  • πŸ’‘ Feature Requests: Feel free to suggest improvements or new features
  • πŸ”§ Pull Requests: Focus on single features and include appropriate tests and documentation

See CONTRIBUTING.md for detailed development guidelines.

Running Tests

This plugin uses plenary.nvim for testing.

Prerequisites

# Install plenary.nvim (if not already installed)
# Using lazy.nvim (add to your plugins):
{ "nvim-lua/plenary.nvim" }

# Or clone manually:
git clone https://github.com/nvim-lua/plenary.nvim \
  ~/.local/share/nvim/site/pack/vendor/start/plenary.nvim

Run Tests

# Run all tests
make test

# Run specific test file
make test-file FILE=spec/markdown-plus/config_spec.lua

# Watch for changes and run tests
make test-watch  # requires 'entr' command

# Run linter
make lint  # requires 'luacheck'

# Format code
make format  # requires 'stylua'

# Check formatting without modifying
make format-check

Code Quality Tools

Linter: luacheck

# Install via LuaRocks
luarocks install luacheck

Formatter: stylua

# Install via Homebrew (macOS)
brew install stylua

# Or via Cargo
cargo install stylua

Test Structure

spec/
β”œβ”€β”€ markdown-plus/
β”‚   β”œβ”€β”€ config_spec.lua       # Configuration tests
β”‚   β”œβ”€β”€ utils_spec.lua        # Utility function tests
β”‚   β”œβ”€β”€ list_spec.lua         # List management tests
β”‚   β”œβ”€β”€ headers_spec.lua      # Headers & TOC tests
β”‚   β”œβ”€β”€ links_spec.lua        # Link management tests
β”‚   └── quote_spec.lua        # Quote management tests
└── minimal_init.lua          # Test environment setup

Development Workflow

  1. Create a feature branch: git checkout -b feature/your-feature
  2. Add tests for new features
  3. Ensure all tests pass: make test
  4. Run linter: make lint
  5. Format code: make format
  6. Submit a pull request

Clone this wiki locally