html: add setting to disable end tag suggestions #269605
Merged
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