vscode-phoenix icon indicating copy to clipboard operation
vscode-phoenix copied to clipboard

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

Open daniel-leal opened this issue 1 year ago • 4 comments

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

daniel-leal avatar Feb 23 '24 12:02 daniel-leal

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

{
  "[phoenix-heex]": {
    "editor.defaultFoldingRangeProvider": "vscode.html-language-features"
  }
}

samharnack avatar Mar 26 '24 12:03 samharnack

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?

glhrmv avatar Jun 01 '24 21:06 glhrmv

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?

It should be possible. Extensions can contribute default settings

lukaszsamson avatar Aug 05 '24 17:08 lukaszsamson