-
Notifications
You must be signed in to change notification settings - Fork 76
[XML] Formatting preference page #860
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[XML] Formatting preference page #860
Conversation
This PR provides the format settings that XML language server: Please note that some format settings doesn't appear in the preferences (like https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md#xmlformatpreservednewlines) because we have the intention to move our current formatter to a new experimental formatter https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md#xmlformatexperimental when it will supports all existing settings). As https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md#xmlformatpreservednewlines is not supported by experimental formatter I have not add it. Please note too that the UI preferences is very basic and it should be improved by disable some preferences according to an another. For instance Once experimental formatter will replace the current formatter, we should add another preference that the experimental formatter support like https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md#xmlformatpreservespace If you wish to know more detail about the LemMinX settings for formatting, please read https://github.com/redhat-developer/vscode-xml/blob/main/docs/Formatting.md |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some wording suggestions
...rc/org/eclipse/wildwebdeveloper/xml/internal/ui/preferences/XMLFormattingPreferencePage.java
Show resolved
Hide resolved
...rc/org/eclipse/wildwebdeveloper/xml/internal/ui/preferences/XMLFormattingPreferencePage.java
Show resolved
Hide resolved
@@ -23,6 +23,16 @@ XMLCatalogPreferencePage_OpenInEditorApplyAndEdit=Apply and Edit | |||
# XML CodeLens preference page | |||
XMLCodelensPreferencePage_codelens_enabled=Enable XML &CodeLens | |||
|
|||
# XML Formatting preference page | |||
XMLFormattingPreferencePage_format_emptyElements=Expand/collapse empty elements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest Default visibility for empty elements
XMLFormattingPreferencePage_format_emptyElements=Expand/collapse empty elements | |
XMLFormattingPreferencePage_format_emptyElements=Default visibility for empty elements |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to keep this label since we use it too in vscode-xml.
# XML Formatting preference page | ||
XMLFormattingPreferencePage_format_emptyElements=Expand/collapse empty elements | ||
XMLFormattingPreferencePage_format_spaceBeforeEmptyCloseTag=Insert space before end of self closing tag | ||
XMLFormattingPreferencePage_format_splitAttributes=&Split multiple attributes each onto a new line |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Split is probably not the right term. I suggest Place attributes on separate lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XMLFormattingPreferencePage_format_splitAttributes=&Split multiple attributes each onto a new line | |
XMLFormattingPreferencePage_format_splitAttributes=&Place attributes on separate lines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...se.wildwebdeveloper.xml/src/org/eclipse/wildwebdeveloper/xml/internal/ui/messages.properties
Outdated
Show resolved
Hide resolved
XMLFormattingPreferencePage_format_spaceBeforeEmptyCloseTag=Insert space before end of self closing tag | ||
XMLFormattingPreferencePage_format_splitAttributes=&Split multiple attributes each onto a new line | ||
XMLFormattingPreferencePage_format_splitAttributesIndentSize=&Levels to indent the attributes | ||
XMLFormattingPreferencePage_format_closingBracketNewLine=Put a closing bracket on a newline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
XMLFormattingPreferencePage_format_closingBracketNewLine=Put a closing bracket on a newline | |
XMLFormattingPreferencePage_format_closingBracketNewLine=Place closing brackets on new lines |
...se.wildwebdeveloper.xml/src/org/eclipse/wildwebdeveloper/xml/internal/ui/messages.properties
Outdated
Show resolved
Hide resolved
XMLFormattingPreferencePage_format_splitAttributesIndentSize=&Levels to indent the attributes | ||
XMLFormattingPreferencePage_format_closingBracketNewLine=Put a closing bracket on a newline | ||
XMLFormattingPreferencePage_format_preserveAttributeLineBreaks=&Preserve line breaks that appear before and after attributes | ||
XMLFormattingPreferencePage_format_xsiSchemaLocationSplit=Split `xsi:schemaLocation` content |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure what it means?
XMLFormattingPreferencePage_format_xsiSchemaLocationSplit=Split `xsi:schemaLocation` content | |
XMLFormattingPreferencePage_format_xsiSchemaLocationSplit=Place URLs in `xsi:schemaLocation` attribute on separate lines |
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to keep this label since we use it too in vscode-xml.
b815fb8
to
a10bcdd
Compare
Fixes eclipse-wildwebdeveloper#859 Signed-off-by: azerr <[email protected]>
@mickaelistria is there something that you want I fix? |
[XML] Formatting preference page
Fixes #859
Signed-off-by: azerr [email protected]