Out-of-code Insights is a Visual Studio Code extension that allows you to add annotations, comments, and notes without modifying your source files. It is ideal for avoiding clutter in your code with temporary comments or making the code unnecessarily heavy.
You can find me on these platforms:
We’d love to hear your thoughts, feedback, and ideas! Feel free to join the conversation on GitHub Discussions and connect with the community.
- Non-intrusive annotations: Add comments without altering the source code, keeping your files clean and organized.
- Optimized for code reviews: Facilitate team communication by adding comments directly on the relevant lines.
- Avoid code clutter: Maintain clarity and readability of your code by avoiding unnecessary comments.
- Annotations on all file types: Add annotations to any file in your project, including source code, Markdown, JSON, XML, text, etc.
- Intelligent change tracking: Annotations automatically follow file changes as long as edits are made within Visual Studio Code.
- Personalization: Adapt the extension to your needs with various configuration options.
- Threaded discussions: Reply to annotations to create threads and enhance collaboration.
- Advanced annotation management: Move, filter, sort, and navigate annotations with ease.
- Batch Edit Annotations: Modify multiple annotations simultaneously to save time and effort.
- Keyword Search: Quickly find annotations by searching for specific keywords.
- Filter by Severity: Categorize and view annotations based on their severity levels.
- Show AI Suggestion: Display simulated suggestions from AI.
- Show Github Copilot Suggestion: Display simulated suggestions from GitHub Copilot.
- Auto-Resolve Stale Annotations: Automatically handle annotations that are no longer relevant or outdated.
(add in v1.0.3 - Activity bar
)
(PNG binary file
)
- Add annotations: Insert comments or notes on specific lines without modifying the source file, regardless of file type.
- View and manage annotations: See all your annotations in a dedicated panel, modify, delete, or reply to them.
- Toggle annotation visibility: Enable or disable annotation visibility in the editor.
- Move annotations: Drag annotations directly within the editor. Annotations follow their assigned lines; simply position above or below a line to move it.
- CodeLens integration: Manage annotations directly from the editor with CodeLens integration.
- Filter and sort annotations: Filter and sort annotations in the panel for efficient management.
- Export and import: Export your annotations to share or back them up, and import them into other projects.
- Batch Edit Annotations: Modify multiple annotations at once to streamline your workflow.
- Keyword Search: Quickly locate annotations by searching for specific terms or phrases.
- Filter by Severity: Organize annotations based on their severity to prioritize tasks.
- Show AI Suggestion: View simulated suggestions from AI to enhance your annotations.
- Show Copilot Suggestion: View simulated GitHub Copilot suggestions within your annotations for enhanced productivity.
- Auto-Resolve Stale Annotations: Automatically resolve annotations that are no longer relevant, keeping your workspace clean.
- Open Visual Studio Code.
- Access the Extensions Manager:
- Click the Extensions icon in the sidebar.
- Or use the shortcut
Ctrl+Shift+X
(Cmd+Shift+X
on Mac).
- Search for the extension:
- Type "Out-of-code Insights" in the search bar.
- Install the extension:
- Click "Install" next to the appropriate result.
- Restart Visual Studio Code (if required).
- Using the context menu:
- Right-click on the line where you want to add an annotation.
- Select
Add Annotation
.
- Using keyboard shortcuts:
- Place your cursor on the desired line.
- Press
Ctrl+Alt+A
(Windows/Linux) orCmd+Alt+A
(Mac).
- Using the context menu:
- Right-click on the line containing the annotation.
- Select
Edit Annotation
orDelete Annotation
.
- Using keyboard shortcuts:
- Edit an annotation:
- Press
Ctrl+Alt+E
(Windows/Linux) orCmd+Alt+E
(Mac).
- Press
- Delete an annotation:
- Press
Ctrl+Alt+D
(Windows/Linux) orCmd+Alt+D
(Mac).
- Press
- Edit an annotation:
- Open the annotations panel:
- Use the
View Annotations
command from the Command Palette (Ctrl+Shift+P
orCmd+Shift+P
). - Or click the annotations icon in the status bar.
- Use the
- Toggle annotation visibility:
- Use the
Toggle Annotation Visibility
command to make annotations visible or hidden in the editor. - Shortcut:
Ctrl+Alt+T
(Windows/Linux) orCmd+Alt+T
(Mac).
- Use the
- Move an annotation within the editor:
- Position your cursor on the line above or below the annotation.
- Use the
Move Annotation Up
orMove Annotation Down
commands available in the context menu or annotations panel. - Annotations automatically follow their lines when you modify code within Visual Studio Code.
- Add a comment to an existing annotation:
- In the annotations panel, select the annotation you want to reply to.
- Click
Reply
to add a comment and start a thread.
- Filter annotations:
- Use the filtering options in the annotations panel to display annotations by file or author.
- Sort annotations:
- Sort annotations by date, number of comments, etc., for efficient management.
- Modify multiple annotations:
- Open the annotations panel.
- Select the annotations you wish to edit.
- Use the
Batch Edit Annotations
command to apply changes to all selected annotations simultaneously.
- Search for annotations by keyword:
- Use the
Keyword Search
feature in the annotations panel. - Enter the desired keyword to filter annotations containing that term.
- Use the
- Categorize annotations:
- Use the
Filter by Severity
option to display annotations based on their assigned severity levels (e.g., info, warning, error).
- Use the
- View simulated suggestions:
- Use the
Show AI Suggestion
command to display simulated suggestions from AI within your annotations. Select a line in the code editor, right-click to bring up the context menu. In the "out-of-code-insight" submenu, select the "AI Suggest Annotation" option, and it will provide an annotation for that line. - If you want to disabled or enabled AI Suggest, you can do it in the settings.
- Press
Ctrl+Shift+P
to open the Command Palette.- Type the name of the command (for example,
Update OpenAI Key
orReset OpenAI Key
).
- Type the name of the command (for example,
- Important: Ensure you have an OpenAI API key configured to access this feature.
- Use the
- View simulated suggestions:
- Use the
Show Copilot Suggestion
command to display simulated GitHub Copilot suggestions within your annotations. Select @out-of-code-insights to see the suggestions.
- Use the
- Automatic management:
- Enable
Auto-Resolve Stale Annotations
to automatically handle annotations that are outdated or no longer relevant.
- Enable
- Set the path to the annotations file:
- Access the extension settings.
- Enter the desired path in the
Path to annotations file
field. Include the file name (e.g.,annotations.json
), if you not specify the file name, the extension will use the default name (annotations.json
). - Per default, the annotations file is located in the
.out-of-code-insights/annotations.json
directory of your project. - If you change the path, ensure that the directory exists and is accessible. All project using the extension will use this path after the change, else the extension will use the default path in each project.
-
Export Annotations to JSON
- Use the
Export Annotations to JSON
command to export all annotations to a JSON file. - Command:
annotations.exportJSON
- Use the
-
Import Annotations from JSON
- Use the
Import Annotations from JSON
command to import annotations from a JSON file. - Command:
annotations.importJSON
- Use the
-
If annotations are not visible, you can use the
Toggle Annotation Visibility
command to show or hide them. CTRL+ALT+T (Windows/Linux) or CMD+ALT+T (Mac) is the shortcut for this command. A conflict with another extension can cause this issue, like Github Copilot Chat extension. -
Toggle Annotation Pin
- Pin or unpin annotations to keep important notes visible.
- Command:
annotations.pinToggle
-
Convert Annotation to GitHub Issue
- Convert your annotations into GitHub issues for better tracking and management.
- Command:
annotations.convertToIssue
-
Show Copilot Suggestion (Simulated)
- Display simulated GitHub Copilot suggestions within your annotations to enhance productivity.
- Command:
annotations.showCopilotSuggestion
-
Auto-Resolve Stale Annotations
- Automatically resolve annotations that are outdated or no longer relevant.
- Command:
annotations.autoResolveStale
-
Batch Edit Annotations in File
- Modify multiple annotations simultaneously within a file to streamline your workflow.
- Command:
annotations.batchEdit
-
Keyword Search in Annotations
- Quickly locate annotations by searching for specific keywords.
- Command:
annotations.keywordSearch
-
Filter Annotations by Severity
- Organize annotations based on their severity levels for better prioritization.
- Command:
annotations.filterBySeverity
- File modification:
- To ensure annotations track file changes correctly, always modify files within Visual Studio Code. External modifications may disrupt annotation tracking.
- Compatibility with all file types:
- You can add annotations to any file in your project, including source code, Markdown, JSON, XML, text, etc.
- Annotation storage:
- Annotations are stored in a JSON file named
annotations.json
, located by default in the.out-of-code-insights
directory of your project. - Include this file in your version control repository if you want to preserve annotation history and share comments with your team.
- Annotations are stored in a JSON file named
- OpenAI API Key Management:
- The extension uses your OpenAI API key for AI-powered features.
- The key is securely stored using VS Code's Secret Storage, ensuring that your key is protected and only accessible by this extension.
- To remove or update your OpenAI API key:
- Open the Command Palette:
- Press
Ctrl+Shift+P
(Windows/Linux) orCmd+Shift+P
(Mac).
- Press
- Type:
Developer: Clear Extension Secret Storage
. - Select Your Extension:
- In the list that appears, select Out-of-Code Insights.
- This will clear all secrets stored by the extension, including your OpenAI API key.
- Open the Command Palette:
Customize the extension according to your needs by modifying the available settings:
- Username (
annotation.username
): Specifies the name that will appear as the annotation author.- Important: Update the username to properly identify authors.
- Enable annotations (
annotation.enableAnnotations
): Toggles annotation visibility in the editor. - Custom colors (
annotation.colors
):- Customize annotation colors, highlight background, and comment borders for both light and dark themes.
- Enable CodeLens (
annotation.codelens.enable
): Toggles CodeLens integration. - Show commands in CodeLens (
annotation.codelens.showCommands
): Toggles command display in CodeLens. - Batch Edit Annotations (
annotation.batchEdit
): Enable or disable the batch editing feature. - Keyword Search (
annotation.keywordSearch
): Configure settings for keyword-based annotation searching. - Filter by Severity (
annotation.filterBySeverity
): Set preferences for severity-based annotation filtering. - Advanced settings:
- Change detection delay (
annotation.debounceDelay
) - Maximum annotations per file (
annotation.maxAnnotationsPerFile
)
- Change detection delay (
Access settings:
- Go to
File
>Preferences
>Settings
(orCode
>Preferences
>Settings
on Mac). - Search for
annotation
to view all available settings.
Action | Shortcut (Windows/Linux) | Shortcut (Mac) |
---|---|---|
Add an annotation | Ctrl+Alt+A |
Cmd+Alt+A |
Edit an annotation | Ctrl+Alt+E |
Cmd+Alt+E |
Delete an annotation | Ctrl+Alt+D |
Cmd+Alt+D |
Show annotations panel | Ctrl+Alt+S |
Cmd+Alt+S |
Toggle annotation visibility | Ctrl+Alt+T |
Cmd+Alt+T |
Batch Edit Annotations | Ctrl+Alt+B |
Cmd+Alt+B |
Keyword Search | Ctrl+Alt+K |
Cmd+Alt+K |
Filter by Severity | Ctrl+Alt+F |
Cmd+Alt+F |
Show AI Suggestion | Ctrl+Alt+G |
Cmd+Alt+G |
Auto-Resolve Stale Annotations | Ctrl+Alt+R |
Cmd+Alt+R |
Below is the complete list of commands (available via Ctrl+Shift+P) in a tabular format, suitable for inclusion in your README. Each command can be run by opening the Command Palette (Ctrl+Shift+P) and typing its name:
Action | Command | Description |
---|---|---|
Add Annotation | annotations.add |
Adds a new annotation to the current line of code. |
Reply to Annotation | annotations.reply |
Adds a reply/comment to an existing annotation. |
Clear All Annotations | annotations.clearAll |
Removes all annotations from the project. |
Delete Annotation | annotations.delete |
Deletes the annotation on the current line. |
Edit Annotation | annotations.edit |
Edits the annotation on the current line. |
Toggle Annotations Display | annotations.toggleDisplay |
Shows or hides all annotations in the editor. |
Navigate to Annotation | annotations.navigate |
Jumps directly to the specified annotation. |
Export Annotations to JSON | annotations.exportJSON |
Exports all annotations to a JSON file. |
Import Annotations from JSON | annotations.importJSON |
Imports annotations from a JSON file. |
Toggle Annotation Pin | annotations.pinToggle |
Pins or unpins the annotation at the current line. |
Batch Edit Annotations in File | annotations.batchEdit |
Updates all annotations within the current file at once. |
Keyword Search in Annotations | annotations.keywordSearch |
Searches annotations by a keyword. |
AI Suggest Annotation | annotations.aiSuggest |
Requests an AI-generated annotation for the current line of code. |
Move Annotation Up | annotations.moveUp |
Moves the annotation on the current line up by one line. |
Move Annotation Down | annotations.moveDown |
Moves the annotation on the current line down by one line. |
Show Annotations Panel | annotations.show |
Opens the annotations panel to view and manage all annotations. |
Update OpenAI Key | annotations.updateOpenAIKey |
Prompts you to enter a new OpenAI API key. |
Reset OpenAI Key | annotations.resetOpenAIKey |
Clears the stored OpenAI API key, requiring a new key on the next AI call. |
- Renamed or deleted files: Automatically updates or removes annotations when files are renamed or deleted.
- Export and import annotations: Share or back up annotations, and import them into other projects.
- Status bar integration: Displays the number of annotations in the status bar for quick access.
- Navigate to annotations: Quickly jump to a specific annotation from the annotations panel.
- Advanced customization: Adjust the extension’s behavior to suit your preferences.
- Batch Edit Annotations: Efficiently manage multiple annotations with batch editing capabilities.
- Keyword Search: Enhance your workflow by searching annotations using specific keywords.
- Filter by Severity: Organize annotations based on their severity levels for better prioritization.
- Show AI Suggestion: Benefit from simulated suggestions to improve your annotation process.
- Auto-Resolve Stale Annotations: Maintain a clean workspace by automatically resolving outdated annotations.
The Out-of-Code Insights extension includes a Tree View and an Activity Bar for efficient annotation management. Here is a detailed description of these features:
The Tree View allows you to visualize and manage annotations in a structured manner. It is accessible via the Activity Bar in Visual Studio Code.
- Grouping by file: Annotations are grouped by file, making navigation and management easier.
- Annotation display: Each file contains a list of annotations with details such as the author, date, and annotation message.
- Annotation actions: You can navigate to an annotation, edit it, delete it, or add comments directly from the Tree View.
The Activity Bar adds a dedicated icon for Out-of-Code Insights in the Visual Studio Code sidebar. Clicking this icon opens the Tree View of annotations.
- Quick access: The Activity Bar provides quick access to all annotations in your project.
- Centralized management: All annotations are centralized in a single view, making them easier to manage and navigate.
-
Open the Tree View:
- Click the Out-of-Code Insights icon in the Activity Bar.
- The Tree View opens, displaying annotations grouped by file.
-
Navigate to an annotation:
- Click on an annotation in the Tree View.
- The code editor automatically positions itself on the line of the selected annotation.
-
Edit or delete an annotation:
- Right-click on an annotation in the Tree View.
- Select Edit or Delete from the context menu.
-
Add a comment:
- Select an annotation in the Tree View.
- Click Reply to add a comment to the annotation.
These features enhance annotation management by providing an overview and management tools directly integrated into the Visual Studio Code interface.
Contributions are welcome! Feel free to suggest improvements, report issues, or submit pull requests.
See the LICENSE file for more information.
Out-of-code Insights helps you manage comments and notes in your projects without cluttering your source code. By providing a platform for non-intrusive annotations, precise change tracking, and seamless integration into your development environment, this extension is a practical tool for developers and teams looking to improve collaboration and productivity.
Try Out-of-code Insights today and streamline your workflow without overloading your code!