Skip to content

Commit 35d4af9

Browse files
dkwon17fbricon
authored andcommitted
Support for quoteStyle and enforceQuoteStyle settings
Signed-off-by: David Kwon <dakwon@redhat.com>
1 parent 4adf3db commit 35d4af9

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ The following settings are supported:
6161
* `xml.format.preservedNewLines`: Set the maximum amount of newlines between elements. Defaults to `2`.
6262
* `xml.format.preserveEmptyContent`: Set to `true` to preserve standalone whitespace content in an element. Defaults to `false`.
6363
* `xml.format.spaceBeforeEmptyCloseTag`: Set to `true` to insert space before the end of a self closing tag. Defaults to `true`.
64-
* `xml.format.quotations`: Set to `doubleQuotes` to format and only use `"`, or `singleQuotes` to format and only use `'`. Defaults to `doubleQuotes`.
6564
* `xml.format.enabled` : Enable/disable formatting.
6665
* `xml.autoCloseTags.enabled` : Enable/disable automatic tag closing.
6766
**Note** 'editor.autoClosingBrackets' must be turned off to work.
@@ -78,6 +77,8 @@ The following settings are supported:
7877
* `xml.symbols.excluded`: Disable document symbols (Outline) for the given file name patterns. Updating file name patterns does not automatically reload the Outline view for the relevant file(s). Each file must either be reopened or changed, in order to trigger an Outline view reload.
7978

8079
Since 0.12.0:
80+
* `xml.format.enforceQuoteStyle`: preferred|ignore : Enforce preferred quote style / ignore quote formatting.
81+
* `xml.preferences.quoteStyle`: Preferred quote style to use for completion: `single` quotes, `double` quotes. Default is `double`.
8182
* `xml.symbols.maxItemsComputed`: The maximum number of outline symbols and folding regions computed (limited for performance reasons). Default is `5000`.
8283
* `files.insertFinalNewline`: now affects XML formatting. Enable/disable inserting a final newline
8384
when formatting an XML document. Default is `false`.
@@ -135,5 +136,3 @@ Feedback
135136
## License
136137

137138
EPL 1.0, See [LICENSE](https://github.com/redhat-developer/vscode-xml/blob/master/LICENSE) file.
138-
139-

package.json

Lines changed: 29 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,13 @@
9898
"items": {
9999
"type": "string"
100100
},
101-
"description": "Array of XML Catalogs",
101+
"description": "Array of XML Catalogs.",
102102
"scope": "window"
103103
},
104104
"xml.logs.client": {
105105
"type": "boolean",
106106
"default": true,
107-
"description": "Should the server log to client output"
107+
"description": "Should the server log to client output."
108108
},
109109
"xml.format.emptyElements": {
110110
"type": "string",
@@ -120,19 +120,19 @@
120120
"xml.format.splitAttributes": {
121121
"type": "boolean",
122122
"default": false,
123-
"description": "Split multiple attributes each onto a new line",
123+
"description": "Split multiple attributes each onto a new line.",
124124
"scope": "window"
125125
},
126126
"xml.format.joinCDATALines": {
127127
"type": "boolean",
128128
"default": false,
129-
"description": "Join lines in a CDATA tag's content",
129+
"description": "Join lines in a CDATA tag's content.",
130130
"scope": "window"
131131
},
132132
"xml.format.joinCommentLines": {
133133
"type": "boolean",
134134
"default": false,
135-
"description": "Join comment content on format",
135+
"description": "Join comment content on format.",
136136
"scope": "window"
137137
},
138138
"xml.format.spaceBeforeEmptyCloseTag": {
@@ -168,17 +168,31 @@
168168
"xml.format.enabled": {
169169
"type": "boolean",
170170
"default": true,
171-
"description": "Enable/disable ability to format document",
171+
"description": "Enable/disable ability to format document.",
172172
"scope": "window"
173173
},
174-
"xml.format.quotations": {
174+
"xml.format.enforceQuoteStyle": {
175175
"type": "string",
176176
"enum": [
177-
"doubleQuotes",
178-
"singleQuotes"
177+
"preferred",
178+
"ignore"
179179
],
180-
"default": "doubleQuotes",
181-
"description": "Which type of quotes to use for attribute values when formatting.",
180+
"markdownEnumDescriptions": [
181+
"Use preferred quote style set by `xml.preferences.quoteStyle` when formatting.",
182+
"Ignore quote style formatting."
183+
],
184+
"default": "preferred",
185+
"description": "Set quote style rule when formatting.",
186+
"scope": "window"
187+
},
188+
"xml.preferences.quoteStyle": {
189+
"type": "string",
190+
"enum": [
191+
"single",
192+
"double"
193+
],
194+
"default": "double",
195+
"markdownDescription": "Preferred quote style to use for completion: `single` quotes, `double` quotes.",
182196
"scope": "window"
183197
},
184198
"xml.fileAssociations": {
@@ -189,7 +203,7 @@
189203
"properties": {
190204
"systemId": {
191205
"type": "string",
192-
"description": "The path or URL to the XML schema (XSD or DTD)"
206+
"description": "The path or URL to the XML schema (XSD or DTD)."
193207
},
194208
"pattern": {
195209
"type": "string",
@@ -209,13 +223,13 @@
209223
"xml.completion.autoCloseTags": {
210224
"type": "boolean",
211225
"default": true,
212-
"description": "Enable/disable autoclosing of XML tags. \n\nIMPORTANT: Turn off editor.autoClosingTags for this to work",
226+
"description": "Enable/disable autoclosing of XML tags. \n\nIMPORTANT: Turn off editor.autoClosingTags for this to work.",
213227
"scope": "window"
214228
},
215229
"xml.codeLens.enabled": {
216230
"type": "boolean",
217231
"default": false,
218-
"description": "Enable/disable XML CodeLens"
232+
"description": "Enable/disable XML CodeLens."
219233
},
220234
"xml.java.home": {
221235
"type": [
@@ -232,7 +246,7 @@
232246
"null"
233247
],
234248
"default": "-noverify -Xmx64M -XX:+UseG1GC -XX:+UseStringDeduplication",
235-
"description": "Specifies extra VM arguments used to launch the XML Language Server. Eg. use `-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication` to bypass class verification, increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector",
249+
"description": "Specifies extra VM arguments used to launch the XML Language Server. Eg. use `-noverify -Xmx1G -XX:+UseG1GC -XX:+UseStringDeduplication` to bypass class verification, increase the heap size to 1GB and enable String deduplication with the G1 Garbage collector.",
236250
"scope": "window"
237251
},
238252
"xml.server.workDir": {

0 commit comments

Comments
 (0)