Skip to content

Fold/unfold tags in JSX like HTML #132049

@andersonmalheiro

Description

@andersonmalheiro

Issue Type: Feature Request

When foldind HTML tags inside JSX code, the closing tag is hidden and sometimes this make the understanding of the code a little bit confusing. Also, copying the folded code becomes a bit difficult. I was wondering if its possilble to make it work like in HTML, where when you fold a tag it is possible to see both opening and closing tags.

Imagine that we have this JSX code:

<Container>
    <Navbar>...</Navbar>
    <Content>...</Navbar>
</Container>

When we fold the Container tag, it is displayed like this:

<Container>...

In HTML the code will be like this, showing the closing tag:

<Container>...
</Container>

so its easier to copy the code and understand the structure


VS Code version: Code 1.59.1 (3866c35, 2021-08-19T11:54:37.513Z)
OS version: Linux x64 5.11.0-31-generic
Restricted Mode: No

Metadata

Metadata

Assignees

Labels

bugIssue identified by VS Code Team member as probable bugeditor-foldingEditor code folding issuesgood first issueIssues identified as good for first-time contributorshelp wantedIssues identified as good community contribution opportunitiesinsiders-releasedPatch has been released in VS Code InsidersjavascriptJavaScript support issuesverifiedVerification succeeded

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions