From d580aa3a3f8b576425188be64381047c7b993112 Mon Sep 17 00:00:00 2001 From: Antonio Ospite Date: Thu, 13 Jul 2017 11:20:17 +0200 Subject: [PATCH] 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. --- syntax/scss.vim | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/syntax/scss.vim b/syntax/scss.vim index 6fb9691..48eb39f 100644 --- a/syntax/scss.vim +++ b/syntax/scss.vim @@ -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"