Fix highlighting comments in scss files

The sccs syntax file imports the definitions of the sass indented syntax
where comments follow some indentation rules[1].

These indentation rules are not valid in the scss syntax[2], and their
visual rendering is confusing.

So delete the syntax items referring to sass comments files before using
the newly defined ones.

Also derive the visual style directly from Comment instead of
sassComment, just to stress that the comment definitions are distinct
from the sass ones.

[1] http://sass-lang.com/documentation/file.INDENTED_SYNTAX.html#comments
[2] http://sass-lang.com/documentation/file.SASS_REFERENCE.html#comments

Closes #78.
This commit is contained in:
Antonio Ospite
2017-07-13 11:20:17 +02:00
committed by Tim Pope
parent 4e130d6c60
commit d580aa3a3f

View File

@@ -10,10 +10,15 @@ endif
runtime! syntax/sass.vim
syn match scssComment "//.*" contains=sassTodo,@Spell
syn region scssComment start="/\*" end="\*/" contains=sassTodo,@Spell
syn clear sassComment
syn clear sassCssComment
syn clear sassEndOfLineComment
hi def link scssComment sassComment
syn match scssComment "//.*" contains=sassTodo,@Spell
syn region scssCssComment start="/\*" end="\*/" contains=sassTodo,@Spell
hi def link scssCssComment scssComment
hi def link scssComment Comment
let b:current_syntax = "scss"