diff --git a/after/syntax/ats.vim b/after/syntax/ats.vim deleted file mode 100644 index 613b23e..0000000 --- a/after/syntax/ats.vim +++ /dev/null @@ -1,26 +0,0 @@ -scriptencoding utf-8 - -syntax match logicalAnd '&&' conceal cchar=∧ -syntax match leq '<=' conceal cchar=≤ -syntax match geq '>=' conceal cchar=≥ -syntax match neq '!=' conceal cchar=≠ -syntax match logicalOr '||' conceal cchar=∨ - -" FIXME boring white? -hi! link Conceal Keyword - -" store and remove current syntax value -let old_syntax = b:current_syntax -unlet b:current_syntax - -syn include @c syntax/c.vim -unlet b:current_syntax - -syn region madBlock matchgroup=atsCBlock start="%{" end="%}" contains=@c - -hi def link atsCBlock Special - -" restore current syntax value -let b:current_syntax = old_syntax - -setlocal conceallevel=1 diff --git a/syntax/ats.vim b/syntax/ats.vim index 74072a0..22a630d 100644 --- a/syntax/ats.vim +++ b/syntax/ats.vim @@ -1,3 +1,5 @@ +scriptencoding utf-8 + if !exists('main_syntax') if exists('b:current_syntax') finish @@ -63,6 +65,23 @@ highlight link atsKeyword Keyword highlight link atsType Type highlight link atsIdentifier Identifier +syntax match logicalAnd '&&' conceal cchar=∧ +syntax match leq '<=' conceal cchar=≤ +syntax match geq '>=' conceal cchar=≥ +syntax match neq '!=' conceal cchar=≠ +syntax match logicalOr '||' conceal cchar=∨ + +" FIXME boring white? +hi! link Conceal Keyword + +syn include @c syntax/c.vim + +syn region madBlock matchgroup=atsCBlock start="(%{\|%{^\|%{#" end="%}" contains=@c + +hi def link atsCBlock Special + +setlocal conceallevel=1 + let b:current_syntax = 'ats' if main_syntax ==# 'ats'