tree-sitter-rescript
tree-sitter-rescript copied to clipboard
Should `unit` have a special color ?
For javascript, undefined have it's own color. I think we can have a dedicated color for unit ?
I think it’s just a type name.
undefined in JS is a value of type undefined. But you cannot refer to the type undefined anyhow. I.e., when you use typeof x you compare it with a string. So, the JS case is slightly different.
Perhaps, it is a good idea to give unit the @type.builtin group rather than just @type. If so, should the bool, string, int, float get the same group too?
Why true and false are not @boolean group? int as @number and float as @float?
Why true and false are not
@booleangroup? int as@numberand float as@float?
Pretty sure it’s because highlights.scm is heavily based on JavaScript’s highlight.scm and they are done there the same way. So, no particular strong reason.