tpope/vim-haml

error in sass syntax highlighting after @media

Closed this issue · 3 comments

See the following screenshot:

VIM Screenshot

screenshot

h1
  font-size: 10px

p
  font-size: 8px
@media screen and (min-width: 10px)
  h1
    font-size: 200px

body
  height: 100px

Appears to only happen in combination with this particular css.vim, which isn't yet in any stable release. The solution is to constrain the new @media clause pattern to one line.

This new css.vim causes other issues. Ideally, in the process of updating, we'd first invert the scss.vim dependency on sass.vim, before digging that hole any deeper.

mil commented

Faced by the same issue as in #61, my solution was to add add support for media queries and their associated logical operators (and, not, only).

Not sure if this will get merged as @tpope has architectural plans (referenced above).. nevertheless, for anyone experiencing the problem described in #61 where a media query breaks all further syntax highlighting, here's my fix:

mil@8cfc8ef

I know I'm late to the party, but I appreciate the fix (just pulled it in today).