Contributing to Dooing
July 15, 2025 ยท View on GitHub
Thank you for your interest in contributing to Dooing! This document will guide you through the development process and help you understand the codebase structure.
๐ Getting Started
Prerequisites
- Neovim >= 0.10.0
- Git
- Basic knowledge of Lua and Neovim plugin development
Development Setup
- Fork the repository on GitHub
- Clone your fork locally:
git clone https://github.com/yourusername/dooing.git cd dooing - Create a symlink to your local development version:
# Option 1: Using Lazy.nvim's dev option # Add `dev = true` to your plugin config in Lazy.nvim # Option 2: Manual symlink ln -s /path/to/your/dooing ~/.local/share/nvim/lazy/dooing
๐ Project Structure
Dooing uses a modular architecture where the main functionality is organized into focused modules:
dooing/
โโโ lua/dooing/
โ โโโ ui/ # UI-related modules (NEW STRUCTURE)
โ โ โโโ init.lua # Main UI interface and coordination
โ โ โโโ constants.lua # Shared constants and window IDs
โ โ โโโ highlights.lua # Highlight management and priority colors
โ โ โโโ utils.lua # Utility functions (time, parsing, rendering)
โ โ โโโ window.lua # Main window creation and management
โ โ โโโ rendering.lua # Todo rendering and highlighting logic
โ โ โโโ actions.lua # Todo CRUD operations
โ โ โโโ components.lua # UI components (help, tags, search, scratchpad)
โ โ โโโ keymaps.lua # Keymap setup and management
โ โ โโโ calendar.lua # Calendar functionality
โ โโโ init.lua # Main plugin entry point
โ โโโ config.lua # Configuration management
โ โโโ state.lua # State management
โ โโโ server.lua # Server functionality
โโโ plugin/dooing.vim # Vim plugin bootstrap
โโโ doc/dooing.txt # Help documentation
๐๏ธ Module Responsibilities
Core Modules
init.lua: Main plugin entry point and setupconfig.lua: Configuration management and defaultsstate.lua: Global state management and data persistenceserver.lua: Server-side functionality and data operations
UI Modules
ui/init.lua: Main UI interface that coordinates all UI modulesui/constants.lua: Shared constants, namespaces, and window IDsui/highlights.lua: Highlight group management and priority colorsui/utils.lua: Utility functions for time formatting, parsing, and todo renderingui/window.lua: Main window creation, sizing, and managementui/rendering.lua: Todo rendering logic and highlightingui/actions.lua: Todo CRUD operations (create, update, delete)ui/components.lua: UI components (help window, tags window, search, scratchpad)ui/keymaps.lua: Keymap setup and managementui/calendar.lua: Calendar functionality for due dates
๐ง Development Guidelines
Adding New Features
- Identify the appropriate module: Determine which module should contain your new feature
- UI features: Add to the appropriate
ui/module - Core functionality: Add to the appropriate core module
- New UI components: Consider adding to
ui/components.luaor create a new module if substantial
Modifying Existing Features
- Locate the feature: Use the module responsibilities guide above
- Update related modules: Ensure changes are reflected in all dependent modules
- Test thoroughly: Verify the feature works across different scenarios
Code Style
- Follow standard Lua conventions
- Use meaningful variable and function names
- Add comments for complex logic
- Keep functions focused and single-purpose
- Use local variables and functions when possible
Module Communication
- Constants: Use
ui/constants.luafor shared values - State: Access global state through
state.lua - Configuration: Access config through
config.lua - Inter-module communication: Use require() and return public APIs
๐งช Testing
Manual Testing
- Test your changes with different configurations
- Verify keymaps work correctly
- Test with various todo scenarios (empty lists, many todos, etc.)
- Test window resizing and positioning
- Verify persistence across Neovim sessions
Testing Checklist
- Basic functionality works
- Keymaps are responsive
- No Lua errors in
:messages - Configuration changes are respected
- UI components render correctly
- Data persistence works
- Performance is acceptable
๐ Documentation
Code Documentation
- Add comments for complex functions
- Document public APIs
- Update help text when adding new features
User Documentation
- Update
README.mdfor new features - Update
doc/dooing.txtfor help documentation - Update keymaps tables when adding new keybindings
๐ Submitting Changes
Before Submitting
- Test thoroughly: Follow the testing checklist above
- Update documentation: Ensure all documentation is current
- Check for conflicts: Rebase against the latest main branch
- Follow commit conventions: Use clear, descriptive commit messages
Pull Request Process
- Create a feature branch from
main - Make your changes following the guidelines above
- Test your changes thoroughly
- Update documentation as needed
- Submit a pull request with:
- Clear description of changes
- Testing performed
- Any breaking changes
- Screenshots if UI changes are involved
Pull Request Template
## Description
Brief description of changes made.
## Type of Change
- [ ] Bug fix
- [ ] New feature
- [ ] Breaking change
- [ ] Documentation update
## Testing
- [ ] Manual testing performed
- [ ] No Lua errors
- [ ] All existing features work
- [ ] New features work as expected
## Documentation
- [ ] Updated README.md (if applicable)
- [ ] Updated doc/dooing.txt (if applicable)
- [ ] Updated keymaps documentation (if applicable)
๐ Bug Reports
When reporting bugs, please include:
- Neovim version: Output of
:version - Plugin version: Git commit hash or version tag
- Configuration: Your dooing configuration
- Steps to reproduce: Clear steps to reproduce the issue
- Expected behavior: What should happen
- Actual behavior: What actually happens
- Error messages: Any error messages from
:messages
๐ก Feature Requests
When requesting features:
- Use case: Describe why this feature would be useful
- Proposed solution: How you envision the feature working
- Alternatives: Any alternative solutions you've considered
- Implementation hints: If you have ideas about implementation
๐ Code Review
All contributions go through code review. Reviewers will check for:
- Code quality and style
- Proper module organization
- Testing completeness
- Documentation updates
- Backward compatibility
๐ Getting Help
If you need help:
- Check existing issues on GitHub
- Read the documentation in
doc/dooing.txt - Create a discussion on GitHub
- Join the community discussions
๐ฏ Development Priorities
Current focus areas:
- Performance improvements: Optimizing rendering and state management
- UI enhancements: Improving user experience and visual design
- Feature completeness: Implementing planned features from the backlog
- Code quality: Improving maintainability and test coverage
Thank you for contributing to Dooing! Your efforts help make this plugin better for everyone.