phoenixframework / vscode-phoenix

Syntax highlighting support for Phoenix templates in Visual Studio Code.
https://marketplace.visualstudio.com/items?itemName=phoenixframework.phoenix
MIT License
157 stars 10 forks source link

Feature Request: Fold and Unfold for HTML Tags in .heex files #24

Open daniel-leal opened 4 months ago

daniel-leal commented 4 months ago

Feature Request

Overview:

I would like to propose the addition of a feature that allows folding and unfolding of HTML tags within .heex files. Currently, the vscode-phoenix extension provides excellent support for working with Phoenix framework's .heex files, but the ability to collapse and expand HTML tags would significantly enhance the development experience.

Details:

Feature Description: Add the ability to fold and unfold HTML tags in .heex files. The folding should work specifically for HTML tags, making it easier to navigate and manage the code.

Benefits:

Improved code readability and organization. Streamlined navigation within .heex files containing extensive HTML markup. Enhanced developer productivity.

Example of how it should be:

https://github.com/phoenixframework/vscode-phoenix/assets/3511128/5e962692-bc0c-4d59-bb77-657434ad8e8f

samharnack commented 3 months ago

I was able to resolve this by adding this to my settings:

{
  "[phoenix-heex]": {
    "editor.defaultFoldingRangeProvider": "vscode.html-language-features"
  }
}
glhrmv commented 1 month ago

Is there a way to plug that into the extension's settings itself so that users don't have to do that manually on their own settings?