nvim-ts-rainbow icon indicating copy to clipboard operation
nvim-ts-rainbow copied to clipboard

Colors of tags in tsx file are messed up after inserting new tag

Open doubleChu opened this issue 2 years ago • 2 comments

Describe the bug

Colors of tags look good after opening a file, but if I insert new tags in a tsx file, the color of its tags wouble be messed up.

Steps to reproduce

code:

export default function App(){
  return (
    <div className={style.App}>
      <h1>Hello There<h1>
    </div>
  )
}

type "<h2>Test</h2>" in the same level as <h1> if I type :set filetype=typescriptreact or disable & enable TS highlight it would be refreshed and looks fine. The behavior is also not correct in jsx file, but in html file it is fine.

I have installed nvim-ts-autotag, is that plugin result in the problem?

Expected behavior

The correct tags color

Screenshots

Now: image Expect: image

doubleChu avatar Dec 14 '22 07:12 doubleChu

I can reproduce the problem with and without nvim-ts-autotag: both scenarios yield slightly different wrong outcomes.

fuadsaud avatar Dec 28 '22 01:12 fuadsaud

Something similar seems to happens in C/C++ when inserting new braces pair And when you close file and open it again everything get back to normal image image image

dovvakkin avatar Jan 02 '23 14:01 dovvakkin