tree-sitter-rescript icon indicating copy to clipboard operation
tree-sitter-rescript copied to clipboard

Should `unit` have a special color ?

Open kinooyume opened this issue 4 years ago • 3 comments

For javascript, undefined have it's own color. I think we can have a dedicated color for unit ?

kinooyume avatar Aug 26 '21 16:08 kinooyume

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?

nkrkv avatar Aug 26 '21 19:08 nkrkv

Why true and false are not @boolean group? int as @number and float as @float?

aspeddro avatar Nov 16 '21 15:11 aspeddro

Why true and false are not @boolean group? int as @number and 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.

nkrkv avatar Nov 17 '21 10:11 nkrkv