Skip to content

Add xml.format.mixedContent and xml.format.blockElements settings - #1175

Merged
datho7561 merged 1 commit into
redhat-developer:mainfrom
angelozerr:feature/mixed-content-settings
Oct 7, 2026
Merged

datho7561 merged 1 commit into
redhat-developer:mainfrom
angelozerr:feature/mixed-content-settings

Conversation

@angelozerr

@angelozerr angelozerr commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Add xml.format.mixedContent and xml.format.blockElements settings

Define the two new formatting settings in package.json:

  • xml.format.mixedContent (preserve/normalize/reflow/expand) controls how
    mixed content (text + child elements) is formatted
  • xml.format.blockElements (string[]) defines which elements get block
    treatment (own line with indentation) in mixed content. Unlisted
    elements stay inline with surrounding text. Only effective in reflow mode.

Update Formatting.md documentation with:

  • New sections for both settings with examples
  • Cross-reference from mixed content category explanation
  • New section for @Formatter:off/@Formatter:on comments

Related issues:

@angelozerr angelozerr added this to the 0.30.0 milestone Oct 4, 2026
@angelozerr angelozerr self-assigned this Oct 4, 2026
@angelozerr angelozerr added enhancement New feature or request formatting labels Oct 4, 2026
@angelozerr
angelozerr force-pushed the feature/mixed-content-settings branch 7 times, most recently from b1c4534 to 16d0fd6 Compare October 6, 2026 10:39
Comment thread package.json Outdated
@angelozerr
angelozerr force-pushed the feature/mixed-content-settings branch from 16d0fd6 to 280ef57 Compare October 6, 2026 16:49
@angelozerr angelozerr changed the title Add xml.format.mixedContent and xml.format.inlineElements settings Add xml.format.mixedContent and xml.format.blockElements settings Oct 6, 2026
@angelozerr
angelozerr force-pushed the feature/mixed-content-settings branch from 280ef57 to 3bfbac5 Compare October 6, 2026 16:53
Comment thread package.json Outdated
Define the two new formatting settings in package.json:
- xml.format.mixedContent (preserve/normalize/reflow/expand) controls
how
  mixed content (text + child elements) is formatted
- xml.format.blockElements (string[]) defines which elements get block
  treatment (own line with indentation) in mixed content. Unlisted
  elements stay inline with surrounding text. Only effective in reflow
mode.

Update Formatting.md documentation with:
- New sections for both settings with examples
- Cross-reference from mixed content category explanation
- New section for @Formatter:off/@Formatter:on comments

Related issues:
- redhat-developer#1131
- redhat-developer#1026
- redhat-developer#1012
- eclipse-lemminx/lemminx#1797
- eclipse-lemminx/lemminx#1684
- eclipse-lemminx/lemminx#1649
- eclipse-lemminx/lemminx#1301

Signed-off-by: azerr <azerr@redhat.com>
@angelozerr
angelozerr force-pushed the feature/mixed-content-settings branch from 3bfbac5 to a8a6511 Compare October 7, 2026 16:49

@datho7561 datho7561 left a comment

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.

Looks good. Thanks, Angelo!

@datho7561
datho7561 merged commit 22a83aa into redhat-developer:main Oct 7, 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 formatting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants