Skip to content

Commit 40b976f

Browse files
committed
Add doNotAddAttributeQuotes setting to disable automatic quotes
1 parent 917f070 commit 40b976f

File tree

3 files changed

+11
-0
lines changed

3 files changed

+11
-0
lines changed

extensions/html-language-features/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,12 @@
188188
"default": true,
189189
"description": "%html.autoClosingTags%"
190190
},
191+
"html.doNotAddAttributeQuotes": {
192+
"type": "boolean",
193+
"scope": "resource",
194+
"default": false,
195+
"description": "%html.doNotAddAttributeQuotes%"
196+
},
191197
"html.hover.documentation": {
192198
"type": "boolean",
193199
"scope": "resource",

extensions/html-language-features/package.nls.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
"html.validate.scripts": "Controls whether the built-in HTML language support validates embedded scripts.",
2929
"html.validate.styles": "Controls whether the built-in HTML language support validates embedded styles.",
3030
"html.autoClosingTags": "Enable/disable autoclosing of HTML tags.",
31+
"html.doNotAddAttributeQuotes": "Controls whether quotes are automatically added when completing an attribute.",
3132
"html.mirrorCursorOnMatchingTag": "Enable/disable mirroring cursor on matching HTML tag.",
3233
"html.mirrorCursorOnMatchingTagDeprecationMessage": "Deprecated in favor of `editor.linkedEditing`",
3334
"html.hover.documentation": "Show tag and attribute documentation in hover.",

extensions/html-language-features/server/src/modes/htmlMode.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@ export function getHTMLMode(htmlLanguageService: HTMLLanguageService, workspace:
2626
if (doAutoComplete) {
2727
options.hideAutoCompleteProposals = true;
2828
}
29+
let doNotAddAttributeQuotes = settings && settings.html && settings.html.doNotAddAttributeQuotes;
30+
if (doNotAddAttributeQuotes) {
31+
options.doNotAddAttributeQuotes = true;
32+
}
2933

3034
const htmlDocument = htmlDocuments.get(document);
3135
let completionList = htmlLanguageService.doComplete2(document, position, htmlDocument, documentContext, options);

0 commit comments

Comments
 (0)