mirror of
https://github.com/Microsoft/vscode
synced 2024-08-28 05:19:39 +00:00
Merge pull request #129284 from ssigwart/noQuotes
Add doNotAddAttributeQuotes setting to disable automatic quotes
This commit is contained in:
commit
8d70e049dd
|
@ -38,6 +38,22 @@
|
|||
"type": "object",
|
||||
"title": "HTML",
|
||||
"properties": {
|
||||
"html.completion.attributeDefaultValue": {
|
||||
"type": "string",
|
||||
"scope": "resource",
|
||||
"enum": [
|
||||
"doublequotes",
|
||||
"singlequotes",
|
||||
"empty"
|
||||
],
|
||||
"enumDescriptions": [
|
||||
"%html.completion.attributeDefaultValue.doublequotes%",
|
||||
"%html.completion.attributeDefaultValue.singlequotes%",
|
||||
"%html.completion.attributeDefaultValue.empty%"
|
||||
],
|
||||
"default": "doublequotes",
|
||||
"description": "%html.completion.attributeDefaultValue%"
|
||||
},
|
||||
"html.customData": {
|
||||
"type": "array",
|
||||
"markdownDescription": "%html.customData.desc%",
|
||||
|
|
|
@ -28,6 +28,10 @@
|
|||
"html.validate.scripts": "Controls whether the built-in HTML language support validates embedded scripts.",
|
||||
"html.validate.styles": "Controls whether the built-in HTML language support validates embedded styles.",
|
||||
"html.autoClosingTags": "Enable/disable autoclosing of HTML tags.",
|
||||
"html.completion.attributeDefaultValue": "Controls the default value for attributes when completion is accepted.",
|
||||
"html.completion.attributeDefaultValue.doublequotes": "Attribute value is set to \"\".",
|
||||
"html.completion.attributeDefaultValue.singlequotes": "Attribute value is set to ''.",
|
||||
"html.completion.attributeDefaultValue.empty": "Attribute value is not set.",
|
||||
"html.mirrorCursorOnMatchingTag": "Enable/disable mirroring cursor on matching HTML tag.",
|
||||
"html.mirrorCursorOnMatchingTagDeprecationMessage": "Deprecated in favor of `editor.linkedEditing`",
|
||||
"html.hover.documentation": "Show tag and attribute documentation in hover.",
|
||||
|
|
|
@ -26,6 +26,7 @@ export function getHTMLMode(htmlLanguageService: HTMLLanguageService, workspace:
|
|||
if (doAutoComplete) {
|
||||
options.hideAutoCompleteProposals = true;
|
||||
}
|
||||
options.attributeDefaultValue = settings.html.completion.attributeDefaultValue ?? 'doublequotes';
|
||||
|
||||
const htmlDocument = htmlDocuments.get(document);
|
||||
let completionList = htmlLanguageService.doComplete2(document, position, htmlDocument, documentContext, options);
|
||||
|
|
Loading…
Reference in a new issue