Skip to content

Highlight type arguments after jsxComponentName #147

@phelipetls

Description

@phelipetls

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 :(

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions