Created with ❤️️ by mntcodes.com
Overview
noComments is a Visual Studio Code extension designed to help developers effortlessly generate documentation comments for their functions and methods. With just a click, you can ensure that your code is well-documented and easier to understand, eliminating the hassle of writing comments manually.
Before
After
🌟 Features
- Generate Comments: Automatically generates comments for your functions based on their content.
- Inline Code Lens: Adds a "Generate Comment 👨💻" button next to each function for quick access.
- Customizable API Key: Use your own OpenAI API key to generate comments, keeping you in control of your usage.
🚀 Installation
Install from VSCode Marketplace:
- Visit the VSCode Marketplace and search for noComments.
- Click "Install" to add the extension to your VSCode.
Manual Installation:
- Download the latest release from the Releases page.
- Open VSCode and navigate to
Extensions > Install from VSIX
and select the downloaded .vsix
file.
💡 Usage
- Open a JavaScript or TypeScript file in VSCode.
- Place your cursor on any function you want to document.
- Click the "Generate Comment 👨💻" button that appears on top of the function.
- The generated comment will be inserted above the function automatically.
⚙️ Configuration
To use the extension, you need to provide your OpenAI API key:
- Go to Settings (
Ctrl + ,
or Cmd + ,
on Mac).
- Type noComments and search for
📝 noComments - Enter your Api Key
.
- Enter your OpenAI API key in the
API Key
field & click ENTER.
- Congrats you OpenAI API key is saved successfully!
📃 Example
Before
Generate Comment 👨💻
function add(a, b) {
return a + b;
}
/**
* Adds two numbers together and returns the sum.
*
* This function takes two numerical arguments and returns their sum.
* It performs a simple addition operation and can be used in various
* mathematical calculations or to combine numeric values in an application.
*
* @param {number} a - The first number to add.
* @param {number} b - The second number to add.
* @returns {number} The sum of the two numbers.
*
* @example
* // returns 5
* add(2, 3);
*
* @example
* // returns 0
* add(-1, 1);
*/
function add(a, b) {
return a + b;
}
▶️ Demo
🌱 Contribution
Contributions are welcome! If you have suggestions, features, or improvements, feel free to submit an issue or pull request.
- Fork the repository
- Create a new branch (
git checkout -b feature/your-feature
)
- Commit your changes (
git commit -m 'Add some feature'
)
- Push to the branch (
git push origin feature/your-feature
)
- Open a pull request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgements
Feel free to reach out for any questions or suggestions!
About Me
Twitter
LinkedIn
GitHub
Blog
Note: This extension is open-source and available on GitHub. Contributions and suggestions are greatly appreciated!