zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
45.03k stars 2.44k forks source link

`#pragma region` code folding #12518

Open skejeton opened 2 months ago

skejeton commented 2 months ago

Check for existing issues

Describe the feature

#pragma region allows you to enclose a block of code in C++ to fold them in the editor. It's useful for big files.

If applicable, add mockups / screenshots to help present your vision of the feature

Unfolded Folded

lufog commented 1 month ago

I'd love to have something like

// region: Region name
// endregion: Region name

for Rust as well.

niconsm16 commented 1 month ago

I join this request (regions in rust-analyzer), in conjunction with the correct recognition of custom snippets in rust-analyzer.