Option to filter navigation history to definition/symbol jumps only
- Dominant language
- TypeScript
- Stars
- 193k
- Forks
- 42.4k
- PR merge metrics
- PR metrics pending
Description
### Is your feature request related to a problem? Please describe.
When reading code, using `Go Back` (`workbench.action.navigateBack`) and `Go Forward` (`workbench.action.navigateForward`) traverses through all navigation points—including minor cursor movements, in-file searches (`Ctrl+F`), and diagnostic jumps.
This pollutes the navigation history stack and requires pressing `Alt+Left` multiple times just to return to the previous symbol/definition jump location, creating significant cognitive overhead during deep code reading.
### Describe the solution you'd like
Provide a configuration setting or dedicated commands to restrict/filter navigation history:
1. **New Setting (e.g., `workbench.navigation.historyMode`)**: Allow users to configure what gets recorded in the navigation stack (e.g., `all` vs. `definitionJumpsOnly`).
2. **Or New Commands**: Introduce dedicated actions such as `workbench.action.navigateBackToDefinition` and `workbench.action.navigateForwardToDefinition` that only traverse definition/symbol jump points.
### Describe alternatives you've considered
* **Peek Definition (`Alt+F12`)**: Useful for quick checks, but less convenient when sequentially tracing complex, deep call hierarchies across multiple files.
* **Open to the Side (`Ctrl+Alt+Click`)**: Creates too many editor groups and litters the workspace during long code exploration sessions.
### Additional context
Restricting navigation history strictly to symbol jumps is crucial for maintaining context and lowering cognitive load when navigating large, unfamiliar codebases.
Contributor guide
Assessment
This issue has not been assessed yet.