styled-components / vim-styled-components

Vim bundle for http://styled-components.com based javascript files.
300 stars 24 forks source link

Typescript: using the css helper with generics breaks syntax highlighting #82

Open stevematney opened 1 year ago

stevematney commented 1 year ago

Syntax highlighting breaks and reverts to simple string coloration when writing code like this:

export const backgroundColorStyles = css<BackgroundColorStyles>`
  background-color: ${({ backgroundColor }) => backgroundColor};
`;

I've been able to work around the problem by writing nested css calls like this:

export const backgroundColorStyles = css<BackgroundColorStyles>`
  ${({ backgroundColor }) => css`
    background-color: ${backgroundColor};
  `}
`;
stevematney commented 1 year ago

@JESii this might be a good one to take a shot at if you're still interested in trying it out!

JESii commented 1 year ago

Thanks, @stevematney -- I'm kinda buried ATM, but will see what I can do!

stevematney commented 1 year ago

No worries! Thanks!