Skip to content

Commit 6335fa7

Browse files
Preference to enable/disable validation or schema
Signed-off-by: Nikolas Komonen <nikolaskomonen@gmail.com>
1 parent bf81ad9 commit 6335fa7

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

package.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"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",
165165
"scope": "window"
166166
},
167-
"xml.problems.noGrammar": {
167+
"xml.validation.noGrammar": {
168168
"type": "string",
169169
"enum": [
170170
"ignore",
@@ -176,6 +176,19 @@
176176
"default": "hint",
177177
"description": "The message severity when a document has no associated grammar.",
178178
"scope": "window"
179+
},
180+
"xml.validation.enabled": {
181+
"type": "boolean",
182+
"default": true,
183+
"description": "Enable/disable all validation.",
184+
"scope": "window"
185+
}
186+
,
187+
"xml.validation.schema": {
188+
"type": "boolean",
189+
"default": true,
190+
"description": "Enable/disable schema based validation. Ignored if \"xml.validation.enabled\": false.",
191+
"scope": "window"
179192
}
180193
}
181194
},

src/extension.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ export function activate(context: ExtensionContext) {
100100
* }
101101
*/
102102
function getXMLSettings(): JSON {
103+
console.log(workspace.getConfiguration());
103104
let configXML = workspace.getConfiguration().get('xml');
104105
let xml;
105106
if (!configXML) { //Set default preferences if not provided

0 commit comments

Comments
 (0)