When I type :
in a comment in a CSS file, VS Code shows a popup with suggestions to autocomplete with any CSS pseudo-element and pseudo-class. Screenshot attached.
screenshot showing the issue I just described
How can I avoid this?
Here are my settings related to this issue:
{
"editor.formatOnType": true,
"editor.quickSuggestions": {
"other": "on", // default
"comments": "off", // default
"strings": "off" // default
},
"editor.snippetSuggestions": "bottom",
"editor.suggest.localityBonus": true,
"editor.suggest.preview": true,
"editor.wordBasedSuggestions": "off",
"emmet.excludeLanguages": ["markdown", "css"],
}
I have removed them all, but it still happens.
When I type :
in a comment in a CSS file, VS Code shows a popup with suggestions to autocomplete with any CSS pseudo-element and pseudo-class. Screenshot attached.
screenshot showing the issue I just described
How can I avoid this?
Here are my settings related to this issue:
{
"editor.formatOnType": true,
"editor.quickSuggestions": {
"other": "on", // default
"comments": "off", // default
"strings": "off" // default
},
"editor.snippetSuggestions": "bottom",
"editor.suggest.localityBonus": true,
"editor.suggest.preview": true,
"editor.wordBasedSuggestions": "off",
"emmet.excludeLanguages": ["markdown", "css"],
}
I have removed them all, but it still happens.
Share Improve this question edited Mar 19 at 17:54 Germán Freixinós asked Mar 19 at 17:53 Germán FreixinósGermán Freixinós 51 silver badge3 bronze badges2 Answers
Reset to default 0This is suggestions on trigger characters. I'd suggest you raise an issue ticket in the VS Code CSS language support repo asking that it don't provide suggestions in comment contexts (following a principle stated by one of the VS Code maintainers).
You could work around the issue by disabling suggest on trigger characters for CSS, but that would affect all contexts in CSS- not just within comments.
"[css]": {
"editor.suggestOnTriggerCharacters": false,
},
You can set editor.suggestOnTriggerCharacters
to false by entering the settings using ctrl+,
.
If that doesn't work, it is probably being overridden by a language specific setting.