HerringtonDarkholme / yats.vim

Yet Another TypeScript Syntax: The most advanced TypeScript Syntax Highlighting in Vim
Vim License
649 stars 68 forks source link

TSX highlighting is thrown off when a React expression is wrapped in parens #256

Closed tremby closed 2 years ago

tremby commented 2 years ago

This code renders correctly:

function thing() {
  return <div>{true && <p>{"x"}</p>}</div>;
};

1

but if I add parens (which is common in JSX/TSX like this) it no longer renders correctly:

function thing() {
  return (
    <div>{true && <p>{"x"}</p>}</div>
  );
};

2

It breaks further if I add more linebreaks and parens, which is also common:

function thing() {
  return (
    <div>
      {true && (
        <p>{"x"}</p>
      )}
    </div>
  );
};

3

HerringtonDarkholme commented 2 years ago

I cannot reproduce it. Are you on vim? Neovim is okay.

image
tremby commented 2 years ago

I trimmed some extra plugins and some configuration which I'm not really using any more, and this now all looks fine. Must have been a conflict somewhere.