visual-studio-codeemmet

Can I prevent VS Code from suggesting HTML Emmet Abbreviations when I start writing the abbreviation with non-lowercase letters?


Why does Emmet try abbreviate words starting with Capital letters even though they are not components nor valid html tag? I find the abbreviations useful for jsx related tasks but it also tries to abbreviate anything that is a capital letter. This make it frustrating to use when trying to fill in multiple div tags.

This issue is related to text but I couldn't solve it by using

"emmet.syntaxProfiles": {
  "html": {
    "tag_case": "lower"
  }
}

I don't want to turn the abbreviations off as they are mostly useful. Any ideas?

Tried :

"emmet.syntaxProfiles": {
  "html": {
    "tag_case": "lower"
  }
}

and adjusting the settings on emmet


Solution

  • The culprit is the call to makeSnippetSuggestion in @vscode/emmet-helper. That call is made within doComplete here- especially pay attention to the part that does const currentAbbr = abbreviation + snippetKey.substr(prefix.length);. TL;DR I don't see a way at the time of this writing to prevent this from happening. If you want to be able to do that, then you should raise an issue ticket.