diff --git a/docs/querysync.md b/docs/querysync.md index 7c4ae786099..eb7d424a7be 100644 --- a/docs/querysync.md +++ b/docs/querysync.md @@ -7,21 +7,30 @@ Bazel users working on large projects often need to limit their scope because ev The new approach allows you to import a much larger scope from the beginning, enabling more advanced IDE features as you navigate the code. This doesn't have to be on a per-file basis—it can be per-directory or any other granularity. It's smart: if you enable analysis for one file, it's automatically enabled for all others that share the same dependencies. This way, you gain advanced features in your focus areas while still seeing the bigger picture and benefiting from navigation and code completions across a broader scope. -## How to Enable Query Sync +## Enabling Query Sync +There are two ways to enable the Query Sync mode: -### Enabling Query Sync via the Project View Wizard +### In Settings 1. Open **IntelliJ IDEA**. -2. Go to **File** > **Import Project...** or **File** > **New** > **Project from Existing Sources...** to start the **Project Import Wizard**. -3. Select your project's root directory and click **OK**. -4. In the **Import Project from Bazel** dialog, proceed with the import process. -5. When you reach the **Project View** setup step, enable **Query Sync** by setting the attribute `use_query_sync` to `true`. - ``` - use_query_sync: true - ``` -6. Complete the wizard to generate. -7. Your project is now configured to use Query Sync. - -### Demo -https://github.com/user-attachments/assets/b7600841-2c1c-4ecd-acb6-e1dde044e7b1 +2. Go to Settings -> Other Settings -> Query Sync +3. Check "Enable Query Sync for new projects" +4. Clean your project's old import files (`.ijwb` or `.aswb` directory) +5. Import your project in the same way you were doing before + +### In the Project View file +1. Open **IntelliJ IDEA**. +2. Clean your project's old import files (`.ijwb` or `.aswb` directory) +3. Go to **File** > **Import Project...** or **File** > **New** > **Project from Existing Sources...** to start the **Project Import Wizard**. +4. Select your project's root directory and click **OK**. +5. In the **Import Project from Bazel** dialog, proceed with the import process. +6. When you reach the **Project View** setup step, enable **Query Sync** by setting the attribute `use_query_sync` to `true`. +## Demos + +### Setup, Import & Enable Analysis +https://github.com/user-attachments/assets/8547dcf5-7005-4db9-b555-e39af82ccd92 + +### Auto Sync +https://github.com/user-attachments/assets/28e42b6a-916e-495e-953d-e0e96644790a +