Skip to content

Commit d0e0f55

Browse files
author
Christopher MCAdams
committed
change region for parens, brackets, braces
1 parent c382cd0 commit d0e0f55

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

syntax/coffee.vim

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,11 @@ syn match coffeeKeyword /\<for\s\+own\>/ contained containedin=coffeeRepeat
3939
\ display
4040
hi def link coffeeKeyword Keyword
4141

42-
syn keyword coffeeOperator instanceof typeof delete
42+
syn keyword coffeeOperator instanceof typeof delete length
43+
\ display
4344
hi def link coffeeOperator Operator
4445

45-
syn match coffeeLength /\%(.*\)\.length/hs=e-5
46+
syn match coffeeLength /\%(\S\.\)length/hs=e-5 containedin=@coffeeAll
4647
hi def link coffeeLength Label
4748

4849
syn match coffeeFunction /\s\?[-=]>/
@@ -194,18 +195,22 @@ syn match coffeeProtoAccess /::\s*\%(\I\|\$\)\%(\i\|\$\)*/he=s+2 contains=@coffe
194195
hi def link coffeeProtoAccess coffeeExtendedOp
195196

196197
" This is required for interpolations to work.
197-
syn region coffeeCurlies matchgroup=coffeeCurly start=/{/ end=/}/
198+
syn region coffeeCurlies matchgroup=coffeeBraces start=/{/ end=/}/
198199
\ contains=@coffeeAll
199200
syn region coffeeBrackets matchgroup=coffeeBracket start=/\[/ end=/\]/
200201
\ contains=@coffeeAll
201-
syn region coffeeParens matchgroup=coffeeParen start=/(/ end=/)/
202+
syn region coffeeParens matchgroup=coffeeBlockParen start=/(/ end=/)/
202203
\ contains=@coffeeAll
203204

204205
" These are highlighted the same as commas since they tend to go together.
205-
hi def link coffeeBlock coffeeSpecialOp
206-
hi def link coffeeBracket coffeeBlock
207-
hi def link coffeeCurly coffeeBlock
208-
hi def link coffeeParen coffeeBlock
206+
hi! def link coffeeParens Special
207+
hi! def link coffeeBlockParen Operator
208+
209+
hi! def link coffeeCurlies Special
210+
hi! def link coffeeBraces Function
211+
212+
hi! def link coffeeBrackets NONE
213+
hi! def link coffeeBracket Function
209214

210215
" This is used instead of TOP to keep things coffee-specific for good
211216
" embedding. `contained` groups aren't included.

0 commit comments

Comments
 (0)