Skip to content

[clangd] Add folding ranges for #ifdef sections #110390

@torshepherd

Description

@torshepherd

Folding ranges (or whatever the corresponding LSP term is) allow users to 1. See the top line of the range as they scroll down stickily and 2. Fold entire ranges of code they don't care about

#ifdef and other preprocessor conditional blocks are well suited for this because 1. devs would benefit from seeing things like #ifdef clang following their cursor when they're very far down in a large file, and 2. e. g. A Linux dev might want to collapse an entire #ifdef WINDOWS section that's irrelevant to their work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions