Skip to content

No syntax highlighting until the first edit #254#271

Merged
L-TChen merged 1 commit intobanacorn:masterfrom
vic0103520:fix/issue-254-highlighting-refresh
Jan 31, 2026
Merged

No syntax highlighting until the first edit #254#271
L-TChen merged 1 commit intobanacorn:masterfrom
vic0103520:fix/issue-254-highlighting-refresh

Conversation

@vic0103520
Copy link
Contributor

The root cause is that VSCode was not notified that semantic tokens had changed.

This PR implements the onDidChangeSemanticTokens event to push updates to VSCode, and wires the extension's internal highlighting generation to this emitter, ensuring immediate visual refreshes upon every load.

… generated

- Added `onDidChangeSemanticTokens` support to VS Code bindings.
- Created a global event emitter for semantic tokens in `Main`.
- Added `onUpdate` channel to `Tokens` that fires on highlighting generation.
- Subscribed to `onUpdate` in `Main` to trigger the VS Code event.
- Added regression test for `onUpdate` event emission.
@L-TChen L-TChen merged commit 84def5c into banacorn:master Jan 31, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants