-
Notifications
You must be signed in to change notification settings - Fork 24
Description
Description
I'm experiencing an issue with the MATLAB syntax highlighting in VS Code where variables are incorrectly identified as functions. This causes my custom styling for functions to be incorrectly applied to variables, making the code harder to read.
Current Behavior
A variable is incorrectly identified with the scope entity.name.function.matlab
in certain contexts, especially when it's used with parentheses for array indexing. This causes it to be styled as a function even though it's a variable.
Expected Behavior
Variables should be consistently identified with scopes like variable.other.readwrite.matlab
or meta.assignment.variable.single.matlab
regardless of whether they're being indexed with parentheses. Function styling should only apply to actual function names.
Additional Information
When inspecting the token scopes using the "Developer: Inspect Editor Tokens and Scopes" command:
- The same variable is sometimes identified as
variable.other.readwrite.matlab
ormeta.assignment.variable.single.matlab
- But when used with parentheses for indexing, it's identified as entity.name.function.matlab
I've tried creating explicit style rules for variables, but the inconsistent scope identification makes it impossible to style functions and variables distinctly.