microsoft / microsoft/vscode-cmake-tools

Project outline should provide 'Sync with Active Document'

Open
#3,593 1 comment 0 reactions 0 assignees View on GitHub
enhancement Feature: Project Outline View
Dominant language
TypeScript
Stars
1.7k
Forks
546
Avg merge
2d 16h
Merged PRs (30d)
32

Description

### Brief Issue Summary

**Problem**: Currently, switching active documents does not sync the project outline and there doesn't seem to be an option to enable such behavior or other means for the user to sync. The outline does not behave the same way the 'Explorer' and 'Open Editors' panels do.

* Version tested: 1.86.1

The 'Explorer' and the 'Open Editors' panels sync the active document by default. The behavior is customizable via the "explorer.autoReveal" flag. In VS 2022, there are two options to make this happen in the solution explorer:

* either by having the IDE track the active item
* customizable via the options
* ![image](https://github.com/microsoft/vscode-cmake-tools/assets/11193042/1883e12b-16b8-43cb-96ef-a58355e294ae)

* by letting the user hit a button that does the sync
* button is invisble if tracking is enabled
* ![image](https://github.com/microsoft/vscode-cmake-tools/assets/11193042/fde21c4a-3f60-4375-ab0b-2a0c6db30108)

This functionality can be very helpful if one is working with multiple files from multiple different libraries and executables in larger projects. As a first step, reusing the "autoReveal" setting to enable this behavior would already go a long way. Ideally, the VS2022 approach would be the most user-friendly one.

The terminology for this functionality is inconsistent across tools and even within a single tool, like VS2022. At least the terms "track", "sync" and "reveal" are used to describe the same behavior, so sticking to the terminology used for the 'Explorer' (i.e. "reveal") would be consistent.

### CMake Tools Diagnostics

_No response_

### Debug Log

_No response_

### Additional Information

_No response_

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the Project outline behavior and comparing it with the Explorer and Open Editors panels, then inspect how the explorer.autoReveal setting is exposed. Done means users can reveal the active document automatically or trigger synchronization manually, according to the chosen design.

Written by the indexing model from the issue text.

Assessment

Tech stack
cmake, typescript
Domain
developer-experience, tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.