zed-gdscript icon indicating copy to clipboard operation
zed-gdscript copied to clipboard

Feature request: Collapsable #regions

Open grndctrl opened this issue 9 months ago • 4 comments

Would be nice to have the ability in Zed to collapse #regions, like the Godot Editor does. Come to think of it, this might be something the tree-sitter is handling though.

grndctrl avatar Apr 02 '25 10:04 grndctrl

I just tested this and currently the parser does not recognize region sections. There's an issue open upstream that mentions it's doable but not that simple to implement.

NathanLovato avatar Jun 15 '25 14:06 NathanLovato

Started working on this in the upstream GDScript parser, once this is working and integrated we'll be able to add this feature in the Zed GDScript extension: https://github.com/PrestonKnopp/tree-sitter-gdscript/pull/34

NathanLovato avatar Jul 02 '25 07:07 NathanLovato

I think Zed doesn't support this yet, see https://github.com/zed-industries/zed/issues/22703

fstxz avatar Oct 01 '25 12:10 fstxz

Yes, that's correct, we cannot support this currently.

At one point we had the parser create region nodes that we could easily query for folding, that would wrap child syntax. But it caused other issues. So we have reverted to using the same approach as in the c# parser which doesn't allow for folding right now in neovim and Zed

NathanLovato avatar Oct 01 '25 13:10 NathanLovato