mirror of
https://github.com/tpope/vim-haml.git
synced 2026-10-12 08:00:23 +08:00
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:
1 parent
4e130d6c60
commit
d580aa3a3f
1 file changed
+8
-3
+8
-3
@@ -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"
|
||||
|
||||
|
||||
Reference in new issue
Block a user