html: add setting to disable end tag suggestions (#269605)

Add html.suggest.hideEndTagSuggestions setting to allow users to
disable automatic end tag completion suggestions.

When enabled, prevents the completion provider from suggesting
closing tags for open elements (e.g., </body> when typing after <body>).

Fixes microsoft/vscode-html-languageservice#216

Signed-off-by: Giovanni Magliocchetti <giovimag123@gmail.com>
This commit is contained in:
Giovanni Magliocchetti
2025-10-21 19:24:16 +02:00
committed by GitHub
parent b42e7ba8b4
commit 00673479b7
2 changed files with 7 additions and 0 deletions

View File

@@ -182,6 +182,12 @@
"default": true,
"description": "%html.suggest.html5.desc%"
},
"html.suggest.hideEndTagSuggestions": {
"type": "boolean",
"scope": "resource",
"default": false,
"description": "%html.suggest.hideEndTagSuggestions.desc%"
},
"html.validate.scripts": {
"type": "boolean",
"scope": "resource",

View File

@@ -23,6 +23,7 @@
"html.format.unformattedContentDelimiter.desc": "Keep text content together between this string.",
"html.format.wrapAttributesIndentSize.desc": "Indent wrapped attributes to after N characters. Use `null` to use the default indent size. Ignored if `#html.format.wrapAttributes#` is set to `aligned`.",
"html.suggest.html5.desc": "Controls whether the built-in HTML language support suggests HTML5 tags, properties and values.",
"html.suggest.hideEndTagSuggestions.desc": "Controls whether the built-in HTML language support suggests closing tags. When disabled, end tag completions like `</div>` will not be shown.",
"html.trace.server.desc": "Traces the communication between VS Code and the HTML language server.",
"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.",