DropComments is a Visual Studio Code extension that helps you automatically add comments to your code using AI.
The goal is to make your code more readable and maintainable with minimal effort.
Features
- Automatically generate code comments with AI assistance
- Support for 20+ programming languages with appropriate comment syntax
- Secure API key storage in VS Code settings
- Progress notifications during comment generation
- Smart comment formatting based on language
- Optional emoji-enhanced comments (toggle via setting)
Requirements
- An OpenAI API key (required for AI comment generation)
- Internet connection for API access
- VS Code workspace trust enabled
Installation
Install DropComments from the VS Code Marketplace (coming soon).
Setup
- Install the extension
- Open VS Code Settings (Ctrl+,)
- Search for "DropComments"
- Enter your OpenAI API key in the "Api Key" field
Usage
- Select the code you want to comment
- Open the Command Palette (Ctrl+Shift+P)
- Run "DropComments: Add Comments to Selection"
- Wait for the AI to generate comments
- Comments will be inserted above your selection
Tip: To include emojis in generated comments, enable Settings > DropComments: Use Emojis.
Supported Languages
TypeScript, JavaScript, Python, Java, C#, C++, C, Go, Rust, PHP, Ruby, Perl, Bash, PowerShell, SQL, HTML, XML, CSS, SCSS, Sass, Less
Settings
dropcomments.apiKey
: Your OpenAI API key (required)
dropcomments.model
: AI model to use (future feature, default: gpt-4o-mini)
dropcomments.commentStyle
: Comment style preference (future feature, default: succinct)
dropcomments.useEmojis
: Include emojis in generated comments (default: false). When enabled, the AI is instructed to add relevant emojis sparingly for clarity.
Roadmap
The initial release includes only basic functionalities, but future updates will bring:
- Support for multiple AI models
- Customizable comment styles and templates
- Inline explanations and documentation generation
- Integration with code review tools
- Bulk commenting for entire files or projects
- Custom prompt templates
Stay tuned for more impressive features!
Contributing
Contributions are welcome! Please open issues or pull requests for suggestions and improvements.
License
MIT