You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When writing a function name that starts with a capital letter in the editor, the syntax highlighter incorrectly identifies it as a type instead of a function. This results in the wrong color being applied to the function name, which is a bit confusing especially when using React.
This is not a theme specific issue, the bug occurs with all the themes.
Reproduction
Create a typescript file and paste this:
typeThisIsAType={foo: 'bar';};functionthisIsAFunction(){return42;}// Same color as the type instead of the functionfunctionThisIsAFunctionNotAType(){return42;}
Tree-sitter parses these identically ("debug: open syntax tree view" from the command palette) so I'm not sure where this getting mixed up, but I can reproduce.
Check for existing issues
Describe the bug / provide steps to reproduce it
When writing a function name that starts with a capital letter in the editor, the syntax highlighter incorrectly identifies it as a type instead of a function. This results in the wrong color being applied to the function name, which is a bit confusing especially when using React.
This is not a theme specific issue, the bug occurs with all the themes.
Reproduction
Create a typescript file and paste this:
Environment
Zed: v0.152.3 (Zed)
OS: macOS 14.6.1
Memory: 16 GiB
Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
If applicable, attach your Zed.log file to this issue.
No response
The text was updated successfully, but these errors were encountered: