Skip to content

Add basic semantic highlighting#84

Draft
Gustaf-C wants to merge 2 commits intomathworks:mainfrom
Gustaf-C:semantic_highlights
Draft

Add basic semantic highlighting#84
Gustaf-C wants to merge 2 commits intomathworks:mainfrom
Gustaf-C:semantic_highlights

Conversation

@Gustaf-C
Copy link
Copy Markdown

@Gustaf-C Gustaf-C commented Apr 2, 2026

Fixes mathworks/MATLAB-extension-for-vscode#45

This adds basic support for semantic highlighting. Currently only variables is implemented, but I plan to do some more work before it is ready to be merged. I am opening a draft PR to allow for some initial feedback.

Results can be seen below where indexed vectors are now correctly identified as variables:
image

Changes

  • Added SemanticTokensProvider.ts which uses the pre-existing indexer to find semantic tokens
  • Updated server.ts to register the provider

Note
Depends on plumbing in mathworks/MATLAB-extension-for-vscode#321

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.

Make different highlighting for function call and variable field access

1 participant