Skip to content

XML Minify support#1774

Merged
datho7561 merged 1 commit into
eclipse-lemminx:mainfrom
angelozerr:minify_support
Apr 21, 2026
Merged

XML Minify support#1774
datho7561 merged 1 commit into
eclipse-lemminx:mainfrom
angelozerr:minify_support

Conversation

@angelozerr
Copy link
Copy Markdown
Contributor

@angelozerr angelozerr force-pushed the minify_support branch 2 times, most recently from 157fa9b to 2c9e798 Compare April 18, 2026 12:59
@angelozerr angelozerr requested a review from datho7561 April 18, 2026 13:08
@angelozerr angelozerr self-assigned this Apr 18, 2026
@angelozerr angelozerr added the enhancement New feature or request label Apr 18, 2026
@angelozerr angelozerr added this to the 0.31.1 milestone Apr 18, 2026
@datho7561
Copy link
Copy Markdown
Contributor

One thing to consider is adding this minifier as a "Source Action" CodeAction, so that it's available in the quickfix menu. This will make the feature usable in IDEs that don't implement the client-side logic to set up the command. If you don't think it's worth the effort though, I understand.

minifyText(edits, (DOMText) node);
break;
case Node.COMMENT_NODE:
// Keep comments as-is for now (could add option to remove them)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might make sense to remove the comments by default. They don't "do" anything, and removing them will reduce the size of the document.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok let me try to do that

@angelozerr
Copy link
Copy Markdown
Contributor Author

One thing to consider is adding this minifier as a "Source Action" CodeAction, so that it's available in the quickfix menu. This will make the feature usable in IDEs that don't implement the client-side logic to set up the command. If you don't think it's worth the effort though, I understand.

Good point! I will try to do that but I dont want to execute minify everytime. I will provide a codeaction which will be executed on resolve code action. It means that client must support resolve code action otherwise minify will not available. Makes sense?

@datho7561
Copy link
Copy Markdown
Contributor

I will provide a codeaction which will be executed on resolve code action. It means that client must support resolve code action otherwise minify will not available. Makes sense?

Makes sense to me, it seems like it will be very expensive to compute on big files, so it makes sense to only do it if resolve is available.

@angelozerr angelozerr force-pushed the minify_support branch 3 times, most recently from c69ddbe to 41ddfba Compare April 20, 2026 22:06
Fixes redhat-developer/vscode-xml#609

Signed-off-by: azerr <azerr@redhat.com>
Copy link
Copy Markdown
Contributor

@datho7561 datho7561 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Thanks, Angelo!

@datho7561 datho7561 merged commit 7f3dc44 into eclipse-lemminx:main Apr 21, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants