summaryrefslogtreecommitdiffstats
path: root/syntax/scala.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2014-04-15 01:05:44 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2014-04-15 01:05:44 +0200
commit610f4c570123510f2d6f4c5799d880d8581126cf (patch)
treea2bbc1de1fbdd22e2b2eb4d4d2447b3cc8467fba /syntax/scala.vim
parentf3833f5a39b91f1e42f12e45a2e61e351218c495 (diff)
downloadvim-polyglot-610f4c570123510f2d6f4c5799d880d8581126cf.tar.gz
vim-polyglot-610f4c570123510f2d6f4c5799d880d8581126cf.zip
Update
Diffstat (limited to 'syntax/scala.vim')
-rw-r--r--syntax/scala.vim31
1 files changed, 14 insertions, 17 deletions
diff --git a/syntax/scala.vim b/syntax/scala.vim
index ce309a89..a61a60af 100644
--- a/syntax/scala.vim
+++ b/syntax/scala.vim
@@ -17,6 +17,8 @@ syn keyword scalaKeyword val nextgroup=scalaNameDefinition,scalaQuasiQuotes skip
syn keyword scalaKeyword def var nextgroup=scalaNameDefinition skipwhite
hi link scalaKeyword Keyword
+syn region scalaBlock start=/{/ end=/}/ contains=TOP fold
+
syn keyword scalaAkkaSpecialWord when goto using startWith initialize onTransition stay become unbecome
hi link scalaAkkaSpecialWord PreProc
@@ -95,31 +97,26 @@ syn region scalaString start=/"/ end=/"/ contains=scalaStringEmbeddedQuote,scala
hi link scalaString String
hi link scalaStringEmbeddedQuote String
-syn region scalaSString matchgroup=Special start=/s"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaEscapedChar,scalaUnicodeChar
+syn region scalaIString matchgroup=Special start=/\<[a-zA-Z][a-zA-Z0-9_]*"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
+syn region scalaTripleIString matchgroup=Special start=/\<[a-zA-Z][a-zA-Z0-9_]*"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaInterpolationB,scalaEscapedChar,scalaUnicodeChar
+hi link scalaIString String
+hi link scalaTripleIString String
+
syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained
-syn match scalaInterpolation /\${[^}]\+}/ contained
-hi link scalaSString String
+syn region scalaInterpolationB matchgroup=scalaInterpolation start=/\${/ end=/}/ contained contains=TOP
hi link scalaInterpolation Function
+hi link scalaInterpolationB Normal
-syn region scalaFString matchgroup=Special start=/f"/ skip=/\\"/ end=/"/ contains=scalaInterpolation,scalaFInterpolation,scalaEscapedChar,scalaUnicodeChar
-syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+%[-A-Za-z0-9\.]\+/ contained
-syn match scalaFInterpolation /\${[^}]\+}%[-A-Za-z0-9\.]\+/ contained
+syn region scalaFString matchgroup=Special start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
+syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained
+syn region scalaFInterpolationB matchgroup=scalaFInterpolation start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=TOP
hi link scalaFString String
hi link scalaFInterpolation Function
-
-syn region scalaQuasiQuotes matchgroup=Type start=/\<q"/ skip=/\\"/ end=/"/ contains=scalaInterpolation
-syn region scalaQuasiQuotes matchgroup=Type start=/\<[tcp]q"/ skip=/\\"/ end=/"/ contains=scalaInterpolation
-hi link scalaQuasiQuotes String
-
-syn region scalaTripleQuasiQuotes matchgroup=Type start=/\<q"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation
-syn region scalaTripleQuasiQuotes matchgroup=Type start=/\<[tcp]q"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation
-hi link scalaTripleQuasiQuotes String
+hi link scalaFInterpolationB Normal
syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar
-syn region scalaTripleSString matchgroup=Special start=/s"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaEscapedChar,scalaUnicodeChar
-syn region scalaTripleFString matchgroup=Special start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaInterpolation,scalaFInterpolation,scalaEscapedChar,scalaUnicodeChar
+syn region scalaTripleFString matchgroup=Special start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar
hi link scalaTripleString String
-hi link scalaTripleSString String
hi link scalaTripleFString String
syn match scalaNumber /\<0[dDfFlL]\?\>/ " Just a bare 0