nvim/syntax/octobercms.vim

19 lines
655 B
VimL

if exists("b:current_syntax")
finish
endif
" changing order of following 4 lines breaks highlighting TODO - why?
syntax include @octoberPHP syntax/php.vim
unlet! b:current_syntax
syntax include @octoberConfig syntax/dosini.vim
runtime! syntax/jinja.vim
syntax region octoberConfig start=@\%^\([a-zA-z]\+[a-zA-Z0-9]\+\s*=\s*\("\|'\)\)\|\[\s*[a-zA-Z0-9]\+\s*\]@ end=+^==$+me=e-2 contains=@octoberConfig
syntax region octoberPHP start=+^==$+ms=s+2 end=+^==$+me=e-2 contains=@octoberPHP
" FIXME - why these no work!
" syntax match octobercmsSectionDelimiter "^==$"
" highlight link octobercmsSectionDelimiter Comment
let b:current_syntax = "octobercms"