A VS Code extension for collaborative commenting with author tracking, timestamps, and threaded discussions - similar to Overleaf's commenting feature.
Features
Inline Comments: Add comments that appear inline in your editor and move with the text
Author Tracking: Every comment records who wrote it and when
Threaded Replies: Reply to comments to create discussion threads
Resolve/Unresolve: Mark comment threads as resolved when issues are addressed
Delete with Confirmation: Delete entire threads or individual replies with safety confirmations
Persistent Storage: Comments are saved in .vscode/collab-comments.json and sync via Git
Configurable Author: Set your default name in settings to avoid repeated prompts
Any File Type: Works on any file - not just QMD or Markdown
Usage
Adding a Comment
Method 1: Context Menu
Place cursor on a line (or select text)
Right-click and choose "Add Comment"
Enter your comment text
Your name is automatically added (from settings or system username)
Method 2: Plus Icon
Click the + icon in the editor gutter
Type your comment and press Ctrl+Enter
Replying to Comments
Click inside the comment thread
Type your reply in the text box
Press Ctrl+Enter to submit
Replies are visually distinguished with a └─ prefix
Resolving Comments
Click the checkmark (✓) button in the comment thread title bar
The author name changes to "RESOLVED - [Author Name]"
Click again to unresolve
Deleting Comments
Delete Entire Thread:
Click the trash icon (🗑️) in the comment thread title bar
Confirm deletion in the modal dialog
Delete Individual Reply:
Open Command Palette (Ctrl+Shift+P)
Type "Delete Reply"
Select the reply to delete
Confirm deletion
Viewing All Comments
Open Command Palette (Ctrl+Shift+P)
Type "View All Comments"
Select a comment to jump to its location
Configuration
Set your default author name to avoid being prompted every time:
Open Settings (Ctrl+,)
Search for "Comment Tracker"
Set "Default Author" to your name
Or edit settings.json:
{
"commentTracker.defaultAuthor": "Your Name"
}
Commands
Command
Description
Comment Tracker: Add Comment
Add a new comment at cursor position
Comment Tracker: View All Comments
List all comments in current file
Comment Tracker: Delete Comment
Delete a comment thread from a list
Comment Tracker: Delete Reply
Delete an individual reply from a thread
Storage
Comments are stored in .vscode/collab-comments.json within your workspace. This JSON file contains:
Comment ID, text, author, and timestamp
File path and line range information
Threaded replies with their own authors and timestamps
Resolved status
Tip: Commit this file to version control (Git) to share comments with your team!
Requirements
VS Code 1.85.0 or higher
Installation
From Source
Clone this repository
Run npm install
Run npm run compile
Press F5 to open a new VS Code window with the extension loaded
Use Cases
Collaborative Writing: Add feedback on drafts without modifying the original text
Code Review: Leave inline comments for discussion before making changes
Document Annotations: Mark sections that need work or clarification
Teaching/Learning: Instructors can comment on student code or documents
Personal Notes: Track your own thoughts and TODOs within any file
Tips
Comments move with the text when you edit the file
Use resolve to close discussions without deleting the history
The JSON file can be committed to Git for team collaboration
Set a default author name in settings to streamline your workflow
Contributing
Contributions are welcome! Please feel free to submit issues or pull requests.