html: add setting to disable end tag suggestions#269605
Merged
aeschli merged 1 commit intomicrosoft:mainfrom Oct 21, 2025
Merged
html: add setting to disable end tag suggestions#269605aeschli merged 1 commit intomicrosoft:mainfrom
aeschli merged 1 commit intomicrosoft:mainfrom
Conversation
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>
aeschli
approved these changes
Oct 15, 2025
Tyriar
approved these changes
Oct 15, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes microsoft/vscode-html-languageservice#216
Summary
This PR adds a new setting
html.suggest.hideEndTagSuggestionsto the HTML extension, allowing users to disable automatic end tag completion suggestions.Related Changes
Changes
Added
html.suggest.hideEndTagSuggestionsbooleanfalseextensions/html-language-features/package.jsonFiles Modified
extensions/html-language-features/package.json- Added new configuration settingextensions/html-language-features/package.nls.json- Added localized descriptionBehavior
Before
Users had no way to disable end tag suggestions. The
html.suggest.html5setting only controlled element suggestions but not closing tag suggestions.After
Users can now set
html.suggest.hideEndTagSuggestions: trueto disable end tag completion suggestions:{ "html.suggest.hideEndTagSuggestions": true }When typing:
With the setting disabled (default), users see closing tag suggestions like
</body>.With the setting enabled, no closing tag suggestions appear.
Testing
This setting relies on the underlying implementation in microsoft/vscode-html-languageservice#219 which includes comprehensive unit tests.
Manual testing:
<body>\n<and verify closing tag suggestion appearshtml.suggest.hideEndTagSuggestions<body>\n<and verify no closing tag suggestion appearsDependencies
This PR depends on an updated version of
vscode-html-languageservicethat includes support for thehideEndTagSuggestionsoption in theCompletionConfigurationinterface.Checklist
package.jsonwith appropriate metadatapackage.nls.json