Semantic Tokens causes editor's theme to flicker when code is invalid
Zig Version
master
ZLS Version
master
Client / Code Editor / Extensions
Sublime Text 4200
Steps to Reproduce and Observed Behavior
- open a zig file
- type code, make the code invalid by typing random chars
- save
- notice editor flicker due to semantic tokens
Expected Behavior
It should not flicker
My guess is that zls resets semantic token state when linter fails, but it shouldn't, otherwise it causes client to flicker
Definition of the flicker:
switches between semantic token theme and normal theme
Attach ZLS log output
No response
Here a video that showcase the issue:
https://github.com/user-attachments/assets/4fbc4458-3099-422d-acbe-eef854efc71e
In the video your provided, after typing the random invalid code, are you saving the file with CTRL+S or are you undoing your text edit with CTRL+Z? The reproduction steps you provided claim the former but the video appears to do the latter.
Could you provide the following information to try and identify what exactly is causing this issue:
- the entire source file (no video or image, feel free to remove unnecessary parts from the file)
- ZLS log output
- contents of
LSP.sublime-settings(Preferences -> Package Settings -> LSP -> Settings) - contents of
Zig.sublime-settings(Preferences -> Package Settings -> Zig -> Settings) - the color scheme being used
Closing as stale. If anyone is still experiencing this issue, feel free to open an issue again and provide reproducible steps.