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

Highlight type arguments after jsxComponentName #147

Open
phelipetls opened this issue Jan 9, 2021 · 0 comments
Open

Highlight type arguments after jsxComponentName #147

phelipetls opened this issue Jan 9, 2021 · 0 comments

Comments

@phelipetls
Copy link
Contributor

I'm trying to highlight type arguments after a component name.

<Component<Type>
    className='container'
  />

This is rarely seen but it would be nice.

I thought it wouldn't be too hard but I didn't manage to get it right.

Since now yats.vim is bundled with Vim, I tried

" <MyComponent ...>
"  ~~~~~~~~~~~
" NOT
" <someCamel ...>
"      ~~~~~
exe 'syntax match jsxComponentName
      \ +\<[_$]\?[A-Z][-_$A-Za-z0-9]*\>+
      \ contained
      \ nextgroup=typescriptTypeArguments
      \ ' .(s:highlight_close_tag ? 'transparent' : '')

But it doesn't work :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants