CodeEditApp / CodeEditApp/CodeEditSourceEditor

✨ Show Code Structure when Scrolling (aka Sticky Headers)

オープン
#42 コメント 3 件 リアクション 1 件 担当者 1 名 @lassevonpfeil が担当を希望しています GitHub で見る
editor enhancement UI
主要言語
Swift
スター
719
フォーク
160
PR マージ指標
30日以内にマージされた PR はありません

説明

### Description

When working in long source files, it's easy to lose track of which class, function, or structural block you're currently in while scrolling. A helpful enhancement would be to show a floating indicator or sticky header that displays the current code structure as you scroll through the file.

### Proposed Behavior

- While scrolling, a temporary overlay or sticky header appears, showing the current structural context (e.g., class, function, namespace).
- The indicator updates in real-time based on scroll position.
- The indicator fades out after scrolling stops or once the user re-engages with the editor.

### Implementation Notes

- We can leverage the existing Tree-sitter integration to identify and display the current structure based on the syntax tree.
- This could tie into the same symbol parsing used for outline views or breadcrumbs, minimizing duplication.

### Benefits

- Improves orientation when navigating large files.
- Reduces mental overhead by keeping context visible.
- Useful for both reading and editing code, especially in deeply nested files.

### Additional Context

This behavior would be especially valuable during code review, debugging, or when working in unfamiliar codebases. It could be made optional in preferences.

- https://twitter.com/a_grebenyuk/status/1534359760308424711?s=21&t=Ok1RPHZ0s8iMU6Bf3HYJyA
- https://learn.microsoft.com/en-us/visualstudio/ide/editor-sticky-scroll?view=vs-2022

## Screenshots

https://github.com/user-attachments/assets/36920923-bfd8-45f1-a63f-9b7873f4de6e

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。