Skip to content

✨ Show Code Structure when Scrolling (aka Sticky Headers) #42

Open

Description

@ProfessorConfundus

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

Screen.Recording.2025-04-19.at.3.39.19.PM.mov

Activity

  1. changed the title [-]Sticky Headers from Xcode 14[/-] [+]✨ Sticky Headers from Xcode 14[/+] on Jun 17, 2022
  2. changed the title [-]✨ Sticky Headers from Xcode 14[/-] [+]✨ Show Code Structure when Scrolling (aka Sticky Headers)[/+] on Apr 19, 2025
  3. austincondiff commented on Apr 19, 2025

    @austincondiff
    Collaborator

    I've updated the issue description for increased clarity.

  4. lassevonpfeil commented on Aug 21, 2025

    @lassevonpfeil

    Is the issue still free to work on? I could give it a shot as it would be my first contribution to this project.

  5. 0xWDG commented on Aug 21, 2025

    @0xWDG
    Collaborator

    Hi @lassevonpfeil I've assigned you to this issue, you can work on it, thanks for supporting the project!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions