Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rust] Scalar types/primitives are not distinguished from non-primitive types #4152

Open
uncenter opened this issue Feb 12, 2025 · 1 comment
Labels
C: Syntax T: enhancement Improvement of existing language features

Comments

@uncenter
Copy link

uncenter commented Feb 12, 2025

What happened?

The TypeScript syntax marks non-primitive types with the support.class scope, and primitive types (e.g. string) with support.type.primitive. Rust scalars/primitives like u32, char, bool, etc are marked as either storage.type or support.type depending on context, which is the same as any other user/library defined type (Box, Result). It would be helpful to be able to differentiate between the two for syntax highlighting.

@deathaxe
Copy link
Collaborator

According to scope naming styleguide primitive built-in types are scoped storage.type. Some syntaxes use storage.type.primitive.

Types, provided by libraries are scoped using a support. scope.

According to TextMate rules, all library/user-defined types are scoped support..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Syntax T: enhancement Improvement of existing language features
Projects
None yet
Development

No branches or pull requests

2 participants