luochen1990 / rainbow

Rainbow Parentheses Improved, shorter code, no level limit, smooth and fast, powerful configuration.
Apache License 2.0
1.78k stars 95 forks source link

[Bug] Messed up parentheses #150

Open CaffeineOnIce opened 4 years ago

CaffeineOnIce commented 4 years ago

The parentheses are all messed up on the html files. Some tags like <div> have different colors under the same nest and even some tags like <body> and <html> opening and closing tags have different colors.

Code -> Filename: index.html

<html>
  <head>
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="style.css" media="screen"/>
    <title>New Tab</title>
   </head>
   <body>
     <br>
     <div class="container">
       <div id="time" class="time"></div>
       <form method="GET" action="http://www.google.com/search">
         <input name="as_q" class="search-field" autofocus>
         <button type="submit" class="search-submit" value="" style="fill: white"></button>
       </form>
         <div class="box">
         <div class="box-container">
           <div class="heading">Social</div>
           <a href="https://www.fb.com/">
             <div class="link" tabindex="1">Facebook</div>
           </a>
           <a href="https://www.youtube.com/">
             <div class="link" tabindex="2">Youtube</div>
           </a>
           <a href="https://www.reddit.com/">
             <div class="link" tabindex="3">Reddit</div>
           </a>
         </div>
         <div class="box-container">
           <div class="heading">Study</div>
           <a href="https://kotlinlang.org/docs/reference/">
             <div class="link" tabindex="4">Kotlin</div>
           </a>
           <a href=""  >
             <div class="link" tabindex="5">BSYS</div>
           </a>
           <a href="https://github.com/">
             <div class="link" tabindex="6">Github</div>
           </a>
         </div>
         <div class="box-container">
           <div class="heading">Anime</div>
           <a href="https://Kissanime.ru/">
             <div class="link" tabindex="7">Kissanime</div>
           </a>
           <a href="https://9anime.to/">
             <div class="link" tabindex="8">9anime</div>
           </a>
           <a href="https://gogoanime.io/">
             <div class="link" tabindex="9">Gogoanime</div>
           </a>
           <a href="https://myanimelist.net/">
             <div class="link" tabindex="10">MyAnimeList</div>
           </a>
           <a href="https://pixiv.net/">
             <div class="link" tabindex="11">Pixiv</div>
           </a>
         </div>
         <div class="box-container">
           <div class="heading">Else</div>
           <a href="https://filebin.net/">
             <div class="link" tabindex="12">Filebin</div>
           </a>
           <a href="https://gmail.com/">
             <div class="link" tabindex="13">Gmail</div>
           </a>
           <a href="https://amazon.in/">
             <div class="link" tabindex="14">Amazon</div>
           </a>
           <a href="https://katcr.to/">
             <div class="link" tabindex="15">Katcr</div>
           </a>
           <a href="https://chiasenhac.vn/">
             <div class="link" tabindex="16">Chiasenhac</div>
           </a>
         </div>
     </div>
     </div>
     <div class="wave-container">
       <div class="wave wave1"></div>
       <div class="wave wave2"></div>
       <div class="wave wave3"></div>
       <div class="wave wave4"></div>
     </div>
     <script src="script.js"></script>
     <br>
     <br>
     <br>
     <br>
   </body>
 </html>

Behaviour: Parentheses colors are all messed and don't necessarily follow a same pattern.

Screenshots: Screenshot from 2020-07-11 23-05-28

Screenshot from 2020-07-11 23-05-36

Extra plugins I use : ale, auto-pairs, minimalist colorscheme, nerd tree, vim-airline, vim-devicons, vim-easy-align, vim-github-dashboard, vim-indent-guides.

And, syntax highlighting is on.

luochen1990 commented 4 years ago

hmmm, you might want to disable Rainbow for HTML via:

let g:rainbow_conf = {
\    'separately': {
\       'html': 0,
\ }
CaffeineOnIce commented 4 years ago

@luochen1990 so, presently no fix?

luochen1990 commented 4 years ago

This is a vim feature, you can try :syntax sync fromstart and see if that will fix this issue