yats.vim icon indicating copy to clipboard operation
yats.vim copied to clipboard

styled-jsx

Open Schniz opened this issue 4 years ago • 0 comments

Hey 👋 thanks for this awesome vim package.

There's an issue with styled-jsx which is the default styling library for Next.js. The following code is being highlighted incorrectly:

export function NextJsStyle() {
  return (
      <style jsx>{`
        .list-item {
          list-style: none;
        }
      `}</style>
  );
}

screenshot

I already mentioned it on #165, the fix did work for CSS rules with parens though:

export function NextJsStyle() {
  return (
      <style jsx>{`
        :global(.item) {
          list-style: none;
        }
      `}</style>
  );
}

screenshot for rule with parens

but even then, I'd assume it should be formatted as a string and not as TypeScript code?

Schniz avatar Mar 24 '20 08:03 Schniz