Closed lucasecdb closed 5 years ago
Also, I forgot this but, the colors after the generics are also wrong, the initialValues
prop should be colored with a light blue, but I don't know what I messed up
So far, what I've done is create a tsxGenerics
region like the following
syntax region tsxGenerics
\ start=+<+
\ end=+>+
\ contained
\ contains=Type
and add a nextgroup=tsxGenerics
to the tsxTagName
Thanks for letting me know, I've added a few updates to your definition. Let's see if it works on your end.
Try adding this in your .vimrc to change the colors to your liking.
hi tsxTypeBraces guifg=#BDA7CC
hi tsxTypes guifg=#8D779C
it worked! thanks @peitalin!
The support for generics in JSX landed in TypeScript 2.9. I've tried implementing this, but the syntax definition in vim is really confusing. I got it working in a very basic scenario, but if the inner type has any arguments of it's own the angular brackets looks messed up.
This is how it looks without my changes
And with the changes I've made
As you can see, the second
>
is colored wrong, it should be a plain white color.