Switch to settings.html.completion.attributeDefaultValue

This commit is contained in:
Stephen Sigwart
2021-08-18 21:20:50 -04:00
parent 40b976f056
commit c5d3ad08f0
3 changed files with 25 additions and 10 deletions

View File

@@ -26,9 +26,11 @@ export function getHTMLMode(htmlLanguageService: HTMLLanguageService, workspace:
if (doAutoComplete) {
options.hideAutoCompleteProposals = true;
}
let doNotAddAttributeQuotes = settings && settings.html && settings.html.doNotAddAttributeQuotes;
if (doNotAddAttributeQuotes) {
options.doNotAddAttributeQuotes = true;
let attributeDefaultValue = settings && settings.html && settings.html.completion.attributeDefaultValue;
if (attributeDefaultValue === 'empty') {
options.useEmptyAttrValue = true;
} else if (attributeDefaultValue === 'singleQuotes') {
options.useSingleQuotesForAttrs = true;
}
const htmlDocument = htmlDocuments.get(document);