microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.46k stars 29.36k forks source link

Square brackets break Emmet in TypeScript files #161431

Open marcushellberg opened 2 years ago

marcushellberg commented 2 years ago

Does this issue occur when all extensions are disabled?: Yes

Steps to Reproduce:

  1. Enable Emmet for TypeScript files, using the html language
  2. Type a snippet with an attribute, like a[href]. Emmet does not expand the snippet.

Emmet behaves as expected in HTML files. This feature used to work prior to the VS Code update that came out in mid-May 2022.

Video showing unexpected behavior in a TypeScript file: https://user-images.githubusercontent.com/883698/191588848-4f666b06-0d4e-49a1-8ac5-1fc59f34df36.mp4

Video showing expected behavior in an HTML file. https://user-images.githubusercontent.com/883698/191589152-29a0712a-b7c7-49df-9002-0c573fc07680.mp4

rzhao271 commented 2 years ago

This is the reverse of https://github.com/microsoft/vscode/issues/138461. Does enabling emmet.triggerExpandOnTab and pressing tab work?

marcushellberg commented 2 years ago

Yes, the expansion works. It doesn't show the autocomplete dropdown, but the actual expansion does work.