p00f/nvim-ts-rainbow

Tsx colors are the other way around

FernandoChu opened this issue · 5 comments

Describe the bug
Tsx colors are the other way around, tags are getting colored, while typescript type annotations are not.

Steps to reproduce
Enable rainbow without extended_mode.

  rainbow = {
    enable = true,
    extended_mode = false
  }

Example code:

const Secret = () => {
  const test: Array<Array<number>> = [[]];

  return (
    <main>
      <div>
        <p>{test}</p>
      </div>
    </main>
  );
};

export default Secret;

Expected behavior
Same behavior as jsx files: jsx tags don't get colored, but with the addition of types annotations getting colored.

Screenshots
Tsx not working correctly
image

Jsx working fine
image

p00f commented

Type annotations not being highlighted is intended, not sure about the nested arrays in tsx though. Can you try out the issue_123 branch to see if the tsx tags are fixed

Arrays are working correctly now, tsx tags are not though

p00f commented

This one should be fixed but extended mode in jsx doesn't work for some reason

is there a branch where this issue is fixed? I just updated the package and tsx files are now messed up for me

image

Gelio commented

@Alex23rodriguez This should be fixed by #125