Skip to content

Commit

Permalink
adjust ytt
Browse files Browse the repository at this point in the history
  • Loading branch information
cappyzawa committed May 12, 2019
1 parent cebb336 commit e56dc73
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion autoload/ytt.vim
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,16 @@ function! ytt#enable()
let l:set_with_contained = 1
call starlark#set_syntax(l:set_with_contained)

syn match yttConditional "if/end" contains=starlarkConditional contained
syn match yttRepeat "for/end" contains=starlarkRepeat contained
syn match yttEnd "end" contained

hi def link yttConditional Conditional
" hi def link yttRepeat Repeat
hi def link yttEnd Statement

syn region yttStatement start="#@" end="$"
\ contains=starlarkStatement,starlarkConditional,starlarkRepeat,starlarkOperator,starlarkType,starlarkBuitin,starlarkInclude,starlarkBlock,starlarkString
\ contains=starlarkStatement,starlarkConditional,starlarkRepeat,starlarkOperator,starlarkType,starlarkBuitin,starlarkInclude,starlarkBlock,starlarkParen,starlarkString,yttConditional,yttRepeat,yttEnd
hi def link yttStatement Comment

syn sync minlines=500
Expand Down

0 comments on commit e56dc73

Please sign in to comment.