microsoft / vscode

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

Enabling highlighting with tree sitter results in broken highlighting #226164

Open ulugbekna opened 3 weeks ago

ulugbekna commented 3 weeks ago

Repro:

  1. Have a typescript file open
  2. Open settings.json
  3. Enable highlighting with tree sitter for typescript
  "editor.experimental.preferTreeSitter": [
    "typescript"
  ]
  1. Go back to the typescript file and see partial highlighting

I don't see anything relevant in the dev console. My theme is light+.

https://github.com/user-attachments/assets/7e3595e9-11ad-4ac3-b597-76b893341b69

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 think the only highlighting you're getting there is from the typescript extension's semantic tokens.

Likely fixed by https://github.com/microsoft/vscode/commit/82216f99d1ff7678bf60445246652ea72c8ecc5c, though you'll still probably have problems until https://github.com/microsoft/vscode/pull/226357 is available.

rzhao271 commented 2 weeks ago

I still only see partial highlighting with the repro steps above. Full highlighting returns only after I reload the window.

alexr00 commented 2 weeks ago

Bug is caused by a different issue, but this is still behind a hidden setting and won't be announced in the release notes this release. Moving to September.