-
Notifications
You must be signed in to change notification settings - Fork 32
Add documentation for the VSCode extension #335
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 7 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
3ff2069
Add about and use VSCode files
jmacdotorg e051a1a
Add further VSCode docs
jmacdotorg 2022017
Remove unrelated ToC entries
jmacdotorg 0c17e03
Various updates
jmacdotorg 73436ea
Fix broken link.
jmacdotorg 388ec8a
Removing spaces.
jmacdotorg a504ebe
Remove spaces for real this time.
jmacdotorg ba6b294
Add notes about Cursor and Windsurf. Other minor tweaks.
jmacdotorg b26e380
Just a little more clarity about non-VSCode editors.
jmacdotorg c5dbd69
s/several minutes/a few minutes/
jmacdotorg f4f9378
Merge branch 'main' into use-vscode
aravindputrevu File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: Review local changes | ||
description: How to review your code with the VSCode extension. | ||
slug: /code-editors | ||
sidebar_label: Overview | ||
--- | ||
|
||
This page is about the CodeRabbit VSCode extension. For a broader overview of CodeRabbit, see [Introduction](/). | ||
|
||
## About the VSCode extension | ||
|
||
The CodeRabbit VSCode extension lets you apply a limited subset of CodeRabbit’s code-review features to your local development environment, directly from the VSCode IDE. | ||
|
||
You can use the extension on its own, or you can use it to complement your local development on a repository whose remote has CodeRabbit installed. | ||
|
||
The extension is intended to let you use the power of CodeRabbit to rapidly tune and tidy your code changes locally, before you publish your changes to your team's remote repository and start a more thorough code review. | ||
|
||
## Features | ||
|
||
The extension includes the following features: | ||
|
||
- Automatic code reviews on every local Git commit | ||
- Manually requested reviews of local code changes | ||
|
||
## Price and limitations | ||
|
||
This extension is free to install and use, and works with any tier of CodeRabbit account. Rate limits apply to the number of local reviews that you can request per hour. | ||
|
||
The extension makes only basic CodeRabbit review features available, with default settings applied. Advanced CodeRabbit features, such as interactive chat and project learnings, aren't available through the VSCode extension. These features are available only by [integrating CodeRabbit on your remote repository](/platforms), and then allowing CodeRabbit to review pull requests. | ||
|
||
## What's next | ||
|
||
- [Install the VSCode extension](/guides/install-vscode) | ||
- [Use the VSCode extension](/guides/use-vscode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
title: Install the VSCode extension | ||
description: How to install the CodeRabbit VSCode extension | ||
--- | ||
|
||
This page is about installing the CodeRabbit VSCode extension. For more information about the extension, see | ||
[Review local changes](/code-editors). | ||
|
||
## Before you begin | ||
|
||
Before you can use the CodeRabbit VSCode extension, you need a CodeRabbit account. | ||
|
||
If you don't already have an account, you can create one by visiting [the CodeRabbit login page](https://app.coderabbit.ai/login). | ||
|
||
## Install the extension | ||
|
||
To install the CodeRabbit VSCode extension, follow these steps: | ||
|
||
1. Visit [the extension's page on the Visual Studio Marketplace](https://marketplace.visualstudio.com/items?itemName=CodeRabbit.coderabbit-vscode). | ||
|
||
1. Click **Install**. | ||
|
||
1. If your browser asks you for permission to open VSCode, then click **Allow** or its equivalent control. | ||
|
||
1. A summary of the CodeRabbit VSCode extension appears in your VSCode window. If you would like VSCode to automatically check for and apply future updates to the extension, then keep the **Auto Update** checkbox selected. | ||
|
||
1. In VSCode, click **Install**. | ||
|
||
1. A **Log in to CodeRabbit to get started** dialog appears. Click **Login**. If the dialog gets dismissed or times out first, then you can follow these alternate steps: | ||
|
||
1. Click the CodeRabbit icon in the VSCode activity bar. | ||
|
||
1. Click the **Use CodeRabbit for Free** button. | ||
|
||
1. Grant VSCode permission to open your browser, if asked. | ||
|
||
1. In your web browser, log into your CodeRabbit account. | ||
|
||
This connects your CodeRabbit account with the CodeRabbit VSCode extension. | ||
|
||
## What's next | ||
|
||
- [Use the VSCode extension](/guides/use-vscode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
title: Uninstall the VSCode extension | ||
description: How to uninstall the CodeRabbit VSCode extension | ||
--- | ||
|
||
This page is about uninstalling the CodeRabbit VSCode extension. For more information about the extension, see | ||
[Review local changes](/code-editors). | ||
|
||
## Uninstall the extension | ||
|
||
To uninstall the VSCode extension, follow these steps: | ||
|
||
1. In the VSCode activity bar, click the CodeRabbit icon. | ||
|
||
1. In the CodeRabbit sidebar, click the door-shaped **Logout** icon. | ||
|
||
1. In the VSCode activity bar, click the **Extensions** icon. | ||
|
||
1. In the Extensions sidebar, click the gear-shaped **Manage** icon next to CodeRabbit in the list of installed extensions. | ||
|
||
1. Select **Uninstall**. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
--- | ||
title: Use the VSCode extension | ||
description: How to review your code with the VSCode extension. | ||
--- | ||
|
||
This page is about performing local code reviews using the CodeRabbit VSCode extension. For more information about the extension, see | ||
[Review local changes](/code-editors). To learn how to install the extension, see [Install the VSCode extension](/guides/install-vscode). | ||
|
||
The CodeRabbit VSCode extension works by comparing changes in your current, checked-out Git branch against another branch in your local repository. You can use the extension to automatically perform full-branch changes after every commit, or make different kinds of comparisons by manually requesting a review. | ||
|
||
## Automatically review local commits | ||
|
||
You can let CodeRabbit automatically review commits that you make to your local Git repository. These automatic reviews compare all committed changes against the branch that your working branch is based on. | ||
|
||
To perform an automatic review, follow these steps: | ||
|
||
1. Perform a Git commit using VSCode. After you do this, a dialog appears in your VSCode window, asking **Would you like to start a review?** | ||
|
||
1. Click **Yes.** The CodeRabbit sidebar appears in your VSCode window. | ||
|
||
1. Wait for the review to complete. This might take several minutes. To cancel a review in progress, click **Stop the review**. | ||
|
||
After the review completes, you can browse and respond to review comments as described in [Work with code reviews](#work-with-code-reviews). | ||
|
||
For more options and control of code reviews performed using the CodeRabbit VSCode extension, you can manually request a review, as detailed in the following section. | ||
|
||
## Manually request code reviews | ||
|
||
To manually review changes in a local Git branch using the CodeRabbit VSCode extension, follow these steps: | ||
|
||
1. Click the CodeRabbit icon in the VSCode activity bar. The CodeRabbit sidebar appears. | ||
|
||
1. If you want to compare your code changes | ||
to a branch other than its base branch, then follow these steps: | ||
|
||
1. In the sidebar, under **Branch**, click the name of the base branch. A **Select a base branch** dialog appears, listing other branches in your local Git repository. | ||
|
||
1. Select the name of a base branch to compare against. | ||
|
||
1. Select one of the review-action options from the menu at the bottom of the CodeRabbit sidebar: | ||
|
||
- To review all changes between the base branch and your current branch, including | ||
both committed and uncommitted changes, select **Review all changes**. This is the default selection. | ||
|
||
- To limit the review to only changes on your branch that you have committed, select **Review committed changes**. This includes commits that you have pushed to your remote repository, if any, as well as any local commits. | ||
|
||
- To limit the review to only uncommitted changes on your branch, select **Review uncommitted changes**. | ||
jmacdotorg marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
1. Refer to the list of **Files to review** in the sidebar. This list represents all of the files that the selected review action includes. To change this list of files, repeat the previous step to choose a different review action, or use Git features like `git stash` to selectively remove changes. | ||
|
||
1. To perform the review, click the button part of the menu. The CodeRabbit sidebar displays a **Review** section with the review's progress. | ||
|
||
1. Wait for the review to complete. This might take several minutes. To cancel a review in progress, click **Stop the review**. | ||
|
||
After the review completes, you can browse and respond to review comments as described in the following section. | ||
|
||
## Work with code reviews | ||
|
||
The CodeRabbit VSCode extension presents code reviews as a series of actionable comments, connected to specific files and lines. It gives you tools to apply its suggestions quickly, when possible. | ||
|
||
### Browse comments | ||
|
||
After the extension finishes its review, it adds any comments to the CodeRabbit sidebar under the **Files** heading in the **Reviews** section. | ||
|
||
Each item in **Files** is a comment referring to one or more lines in that file. Click the comment to see a detailed, inline comment in the editor, attached to the appropriate file and lines. | ||
|
||
You can react to these comments however you want: you can apply their advice literally, or let them guide you to find alternate solutions, or ignore them entirely. CodeRabbit comments are metadata stored with VSCode, and are not part of your files. The presence of comments doesn't block your use of version control. | ||
|
||
### Apply suggested changes | ||
|
||
Whenever possible, the CodeRabbit VSCode extension attaches discrete change suggestion to comments in the form of code diffs. For example, if it detects a typo in a new function name, the extension might attach a diff with a suggested correction. | ||
|
||
If you agree with CodeRabbit about the suggested fix and want to apply to exactly as it proposes, click the checkmark-shaped **Apply suggested change** icon in the inline comment. The extension makes the change for you in the editor. | ||
|
||
### Ignore or collapse comments | ||
|
||
To remove a comment from the editor, click its **Ignore** icon. | ||
|
||
To remove a comment but keep an icon in the editor noting its presence, click its **Collapse** icon. | ||
|
||
To see an ignored or collapsed comment in the editor again, click its summary in the CodeRabbit sidebar. | ||
|
||
### Browse previous reviews | ||
|
||
If you have performed reviews prior to the most recent review in the current VSCode window, then you can browse the comments from these reviews under the **Previous reviews** heading in the CodeRabbit sidebar. | ||
|
||
If a past review comment no longer applies to the current state of your code, then clicking that comment won't display a detailed comment or suggestion in the editor. | ||
|
||
## What's next | ||
|
||
- [Uninstall the VSCode extension](/guides/uninstall-vscode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.