✨ Show Code Structure when Scrolling (aka Sticky Headers)

Open
#42 3 comments 1 reaction 1 assignee View on GitHub

@lassevonpfeil is already working on this.

Since Aug 21, 2025.

Assessment

This issue has not been assessed yet.

Description

editor enhancement UI
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.

Screenshots

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

Dominant language
Swift
Stars
720
Forks
162
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from CodeEditApp/CodeEditSourceEditor

All issues in CodeEditApp/CodeEditSourceEditor

Similar issues

More Swift issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.