Skip to content

georgeharker/comment-tasks.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

9 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Comment Tasks

A universal Neovim plugin that bridges 10+ task management systems with code comments across multiple programming languages. Create, update, and manage tasks directly from your comments without leaving your editor.

πŸš€ Features

Manage tasks from code without losing focus. Maintain task references in code.

Transform your TODO comments into actionable tasks across 10+ platforms while keeping task URLs embedded in your codebase for perfect traceability.

  • πŸ”— Universal Multi-Provider Support: Works with 10+ task management systems
  • 🎯 Custom Status System: Configurable workflows for each provider
  • 🌍 Multi-Language Support: Works with 15+ programming languages using Tree-sitter
  • ✨ Smart Comment Detection: Handles single-line, block comments, and docstrings
  • πŸ”„ Intelligent URL Insertion: Context-aware URL placement
  • ⚑ Unified Command Interface: Same commands work across all providers
  • πŸ“ File Reference Management: Structured file associations with tasks
  • 🧹 Comment Prefix Trimming: Automatically clean TODO, FIXME, and other prefixes
  • 🎨 Language Override: Force specific language detection when needed
  • πŸ”§ Modular Architecture: Extensible system for easy provider addition

πŸ“Š Supported Providers

Provider Type Custom Status Bulk Operations File References
🎯 ClickUp Full βœ… βœ… βœ…
πŸ“‹ Asana Full βœ… ❌ βœ…
⚑ Linear Full βœ… ❌ βœ…
🏒 Jira Full βœ… ❌ βœ…
πŸ“ Notion Full βœ… ❌ βœ…
πŸ“ˆ Monday.com Full βœ… ❌ βœ…
πŸ™ GitHub Issues Basic ❌ ❌ βœ…
🦊 GitLab Issues Basic ❌ ❌ βœ…
πŸ“¦ Trello Basic ❌ ❌ βœ…
βœ… Todoist Basic ❌ ❌ βœ…

Full: Complete workflow customization with any status names
Basic: Open/closed or list-based status management

🌍 Supported Languages

Works with 15+ programming languages including: Python β€’ JavaScript/TypeScript β€’ Lua β€’ Rust β€’ C/C++ β€’ Go β€’ Java β€’ Ruby β€’ PHP β€’ CSS β€’ HTML β€’ Bash β€’ Vim Script β€’ YAML β€’ JSON

πŸ“¦ Installation

Using lazy.nvim

{
    "georgeharker/comment-tasks.nvim",
    dependencies = {
        "nvim-lua/plenary.nvim", -- Required for HTTP requests
    },
    config = function()
        require("comment-tasks").setup({
            default_provider = "clickup", -- Choose your preferred provider
            
            providers = {
                clickup = {
                    enabled = true,
                    api_key_env = "CLICKUP_API_KEY",
                    list_id = "your_clickup_list_id",
                    statuses = {
                        new = "To Do",
                        in_progress = "In Progress",
                        review = "Code Review", 
                        completed = "Complete",
                    }
                },
                -- Add other providers as needed
            },
        })
    end
}

Environment Setup:

export CLICKUP_API_KEY="your_api_key_here"

πŸ“– Detailed Installation: docs/installation.md

πŸš€ Quick Start

  1. Install the plugin with your preferred package manager
  2. Configure your task management provider(s)
  3. Set environment variables for API authentication
  4. Create tasks from comments using commands

Example Workflow

# TODO: Implement user authentication system
# This needs proper validation and error handling

Place cursor on the comment and run :ClickUpTask new β†’

# TODO: Implement user authentication system  
# This needs proper validation and error handling
# https://app.clickup.com/t/task_id

Update task status as you progress:

:ClickUpTask in_progress  " When you start working  
:ClickUpTask review       " When ready for code review
:ClickUpTask close        " When finished (uses completed status)

⚑ Core Commands

Provider-Specific Commands (Recommended)

" ClickUp (Full custom status support)
:ClickUpTask              " Create task (default)
:ClickUpTask create       " Create task (explicit)
:ClickUpTask in_progress  " Update to 'In Progress' status
:ClickUpTask close        " Complete task (uses completed status)
:ClickUpTask addfile      " Add current file to task

" GitHub Issues (Basic support)
:GitHubTask               " Create issue (default)
:GitHubTask create        " Create issue (explicit)
:GitHubTask close         " Close issue
:GitHubTask addfile       " Add file reference

" Asana (Full custom status support)  
:AsanaTask                " Create task (default)
:AsanaTask create         " Create task (explicit)
:AsanaTask blocked        " Update to 'Blocked' status
:AsanaTask close          " Complete task
:ClickUpTask review       " Update to 'Code Review' status
:ClickUpTask completed    " Complete task
:ClickUpTask addfile      " Add current file to task

" GitHub Issues (Basic support)
:GitHubTask new          " Create issue
:GitHubTask close        " Close issue  
:GitHubTask addfile      " Add file reference

" Asana (Full custom status support)  
:AsanaTask new           " Create task
:AsanaTask blocked       " Update to 'Blocked' status
:AsanaTask completed     " Complete task

Generic Commands (Uses default_provider)

:CommentTask new         " Create task with default provider
:CommentTask completed   " Complete task with default provider
:CommentTask             " Create task with default provider (default)
:CommentTask create      " Create task with default provider (explicit)
:CommentTask close       " Complete task with default provider
:CommentTaskAddFile      " Add file reference with default provider

Available commands are generated dynamically from your status configuration.

βš™οΈ Configuration

Basic Setup

require("comment-tasks").setup({
    default_provider = "clickup",  -- Provider for generic commands
    
    providers = {
        clickup = {
            enabled = true,
            api_key_env = "CLICKUP_API_KEY",
            list_id = "123456789",
            statuses = {
                new = "To Do",           -- Special: creates tasks
                completed = "Complete",  -- Special: completes tasks
                review = "Code Review",  -- Custom: creates :ClickUpTask review  
                blocked = "Blocked",     -- Custom: creates :ClickUpTask blocked
            }
        }
    }
})

Status System

Commands are automatically generated from your status configuration:

statuses = {
    new = "Backlog",        -- β†’ :ClickUpTask new (creates with "Backlog")
    completed = "Done",     -- β†’ :ClickUpTask completed (updates to "Done")  
    review = "In Review",   -- β†’ :ClickUpTask review (updates to "In Review")
    testing = "QA Testing", -- β†’ :ClickUpTask testing (updates to "QA Testing")
}

πŸ“– Complete Configuration: docs/configuration.md

πŸ“š Documentation

Setup Guides

Provider Guides

Examples

Reference

πŸ”§ Keybinding Examples

vim.keymap.set("n", "<leader>tcc", function()
    require("comment-tasks").create_clickup_task_from_comment()
end, { desc = "Create ClickUp task" })

vim.keymap.set("n", "<leader>tgh", function() 
    require("comment-tasks").create_github_task_from_comment()
end, { desc = "Create GitHub issue" })

vim.keymap.set("n", "<leader>tc", function()
    require("comment-tasks").create_task_from_comment()
end, { desc = "Create task (default provider)" })

vim.keymap.set("n", "<leader>tu", function()
    require("comment-tasks").update_task_status_from_comment("completed")
end, { desc = "Complete task" })

vim.keymap.set("n", "<leader>tx", function()
    require("comment-tasks").close_task_from_comment()
end, { desc = "Close task" })

🀝 Contributing

We welcome contributions! See our Contributing Guide for:

  • πŸ†• Adding new providers
  • πŸ› Bug reports and fixes
  • πŸ“– Documentation improvements
  • πŸ’‘ Feature suggestions

Development Setup

git clone https://github.com/georgeharker/comment-tasks.nvim.git
cd comment-tasks.nvim

πŸ“„ License

MIT License - see LICENSE for details.

πŸ™ Support


Ready to get started? Check out the Installation Guide and choose your provider setup.

About

Add tasks to your task manager (clickup/github/linear/monday....) from code

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published