microsoft / vscode

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

No special highlighting for regex flags with tree sitter #226165

Open ulugbekna opened 3 weeks ago

ulugbekna commented 3 weeks ago

Expected (current highlighting with text mate) :

Image

Actual (with tree sitter) :

Image

Theme : light+

Version: 1.93.0-insider Commit: e1db90f81da28c0994b5d50dc2b51e964359e62d Date: 2024-08-21T05:04:11.586Z Electron: 30.3.1 ElectronBuildId: 9960165 Chromium: 124.0.6367.243 Node.js: 20.15.1 V8: 12.4.254.20-electron.0 OS: Darwin arm64 23.6.0

alexr00 commented 3 weeks ago

I noticed the same, thanks for filing an issue!

https://github.com/microsoft/vscode/blob/2bf25ee2fdabcbf36caf71ffe1b4d0d360ea4505/src/vs/editor/common/languages/highlights/typescript.scm#L89-L90

ulugbekna commented 3 weeks ago

works in the playground but not here

maybe because of different TS grammar versions used in vscode and in playground

alexr00 commented 2 weeks ago

That's my suspicion as well. I'd prefer to wait for the next Tree-Sitter release to update, but since we build out of source we can always jump ahead to a specific commit if we want.