redhat-developer / redhat-developer/vscode-xml
Improve xml.format.splitAttributes settings
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 328
- Forks
- 101
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 7
Description
Hi.
Currently when xml.format.splitAttributes is set to true, all the attributes appear each on a new line, like this:
<tag
type="sample"
name="foo"
value="bar">
It would be really nice to be able to leave the very first attribute on the same line as the opening tag
and all the other attributes could be aligned by the beginning of this first attribute, like this:
<tag type="sample"
name="foo"
value="bar">
Like add an additional option to either leave the first attribute on the same line as the opening tag OR make each attribute appear on a separate line. And if the "leave the first attribute on the same line" is selected then its beginning should be the start of alignment for all the subsequent attributes.
I am just used to how the "XML Tools Plugin" in Notepad++ does it, so I didn't expect to see the first attribute also on a separate line.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the implementation and tests for the xml.format.splitAttributes setting; no specific files are named in the issue. Compare the existing output with the requested option, where the first attribute stays on the opening-tag line and later attributes align with it, and verify both formatting modes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript, vscode
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100