mirror of
https://github.com/tpope/vim-haml.git
synced 2025-12-09 02:24:45 +08:00
Properly highlight SCSS comments
This commit is contained in:
@@ -12,7 +12,7 @@ runtime! syntax/css.vim
|
|||||||
syn case ignore
|
syn case ignore
|
||||||
|
|
||||||
syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp
|
syn cluster sassCssProperties contains=cssFontProp,cssFontDescriptorProp,cssColorProp,cssTextProp,cssBoxProp,cssGeneratedContentProp,cssPagingProp,cssUIProp,cssRenderProp,cssAuralProp,cssTableProp
|
||||||
syn cluster sassCssAttributes contains=css.*Attr,cssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp
|
syn cluster sassCssAttributes contains=css.*Attr,scssComment,cssValue.*,cssColor,cssURL,sassDefault,cssImportant,cssError,cssStringQ,cssStringQQ,cssFunction,cssUnicodeEscape,cssRenderProp
|
||||||
|
|
||||||
syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP
|
syn region sassDefinition matchgroup=cssBraces start="{" end="}" contains=TOP
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ syn match sassAmpersand "&"
|
|||||||
" TODO: Attribute namespaces
|
" TODO: Attribute namespaces
|
||||||
" TODO: Arithmetic (including strings and concatenation)
|
" TODO: Arithmetic (including strings and concatenation)
|
||||||
|
|
||||||
syn region sassInclude start="@import" end=";\|$" contains=cssComment,cssURL,cssUnicodeEscape,cssMediaType
|
syn region sassInclude start="@import" end=";\|$" contains=scssComment,cssURL,cssUnicodeEscape,cssMediaType
|
||||||
syn region sassDebugLine matchgroup=sassDebug start="@debug\>" end="$" contains=@sassCssAttributes,sassVariable,sassFunction
|
syn region sassDebugLine matchgroup=sassDebug start="@debug\>" end="$" contains=@sassCssAttributes,sassVariable,sassFunction
|
||||||
syn region sassControlLine matchgroup=sassControl start="@\%(if\|else\%(\s\+if\)\=\|while\|for\)\>" end="[{};]\@=\|$" contains=sassFor,@sassCssAttributes,sassVariable,sassFunction
|
syn region sassControlLine matchgroup=sassControl start="@\%(if\|else\%(\s\+if\)\=\|while\|for\)\>" end="[{};]\@=\|$" contains=sassFor,@sassCssAttributes,sassVariable,sassFunction
|
||||||
syn keyword sassFor from to through contained
|
syn keyword sassFor from to through contained
|
||||||
|
|||||||
@@ -9,6 +9,11 @@ endif
|
|||||||
|
|
||||||
runtime! syntax/sass.vim
|
runtime! syntax/sass.vim
|
||||||
|
|
||||||
|
syn match scssComment "//.*" contains=sassTodo,@Spell
|
||||||
|
syn region scssComment start="/\*" end="\*/" contains=sassTodo,@Spell
|
||||||
|
|
||||||
|
hi def link scssComment sassComment
|
||||||
|
|
||||||
let b:current_syntax = "scss"
|
let b:current_syntax = "scss"
|
||||||
|
|
||||||
" vim:set sw=2:
|
" vim:set sw=2:
|
||||||
|
|||||||
Reference in New Issue
Block a user