The Comment Linker extension for Visual Studio Code allows you to create clickable links within comments in Python files. It enhances code documentation by providing an easy way to reference other files, locations, or specific lines in your codebase.
Features
- Automatically detects and highlights links within comments in Python files.
- Supports absolute paths, relative paths, and links to specific line numbers.
- Clicking on a link opens the corresponding file, location, or line within Visual Studio Code.
- Markdown-like experience where after aditing the link, only the link's text will be available, without the url itself.
Installation
- Launch Visual Studio Code.
- Go to the Extensions view (Ctrl+Shift+X).
- Search for "Comment Linker" and click Install.
- Reload Visual Studio Code to activate the extension.
Usage
Open a Python file in Visual Studio Code.
Write comments containing links using the following format:
[description](https://github.com/antunesdq/Comment-Linker/blob/HEAD/path|url:line)
Examples:
- Absolute path:
# Check on the [docs](https://github.com/antunesdq/Comment-Linker/blob/HEAD/home/mattdq/Comment-Linker/example/otherfile.py) for more details.

- Relative path:
# Check on the [docs](https://github.com/antunesdq/Comment-Linker/blob/HEAD/folder/otherfile.py) for more details.

- Line number:
# Check on the [docs](https://github.com/antunesdq/Comment-Linker/blob/HEAD/otherfile.py:16) for more details.

Save the file. The links will be detected and highlighted automatically.
Hover over a link to view its description in a tooltip.
Click on a link to open the corresponding file, location, or line within Visual Studio Code.
Configuration
The Comment Linker extension does not require any additional configuration. It automatically detects and highlights links within comments in Python files.
Known Issues
- Currently, the extension only supports Python files.
- Links are only recognized within comments and not within other parts of the code.
Feedback and Contributions
If you encounter any issues, have suggestions, or would like to contribute to the Comment Linker extension, please visit the GitHub repository. Contributions, bug reports, and feature requests are welcome.
Release Notes
Version 1.1.0
- Added support for linking to specific line numbers.
- Enhanced support for absolute and relative paths.
- Markdown-like experience where after aditing the link, only the link's text will be available, without the url itself.
Version 1.0.0
- Initial release of the Comment Linker extension.
License
This extension is released under the MIT License. See LICENSE for details.
Feel free to modify and expand upon this template to include more specific details about your extension, such as additional features, supported languages, or any customization options available.