Mercurial > vim
comparison runtime/syntax/scala.vim @ 25700:d4faa2c5211b
Update runtime files
Commit: https://github.com/vim/vim/commit/89a9c159f23fb7b3e24e6d09068adfc24a73afcb
Author: Bram Moolenaar <Bram@vim.org>
Date: Sun Aug 29 21:55:35 2021 +0200
Update runtime files
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sun, 29 Aug 2021 22:00:05 +0200 |
parents | 29ec2c198c8d |
children | 3649b5a6b1b6 |
comparison
equal
deleted
inserted
replaced
25699:8088e687c3d7 | 25700:d4faa2c5211b |
---|---|
1 " Vim syntax file | 1 " Vim syntax file |
2 " Language: Scala | 2 " Language: Scala |
3 " Maintainer: Derek Wyatt | 3 " Maintainer: Derek Wyatt |
4 " URL: https://github.com/derekwyatt/vim-scala | 4 " URL: https://github.com/derekwyatt/vim-scala |
5 " License: Same as Vim | 5 " License: Same as Vim |
6 " Last Change: 2021 Aug 11 | 6 " Last Change: 23 August 2021 |
7 " by Jesse Atkinson, PR #8746 | |
8 " ---------------------------------------------------------------------------- | 7 " ---------------------------------------------------------------------------- |
9 | 8 |
10 if !exists('main_syntax') | 9 if !exists('main_syntax') |
11 " quit when a syntax file was already loaded | 10 " quit when a syntax file was already loaded |
12 if exists("b:current_syntax") | 11 if exists("b:current_syntax") |
101 " of `type X =` declarations | 100 " of `type X =` declarations |
102 syn match scalaTypeTypeDeclaration /(/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals contains=scalaRoundBrackets skipwhite | 101 syn match scalaTypeTypeDeclaration /(/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals contains=scalaRoundBrackets skipwhite |
103 syn match scalaTypeTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeTypeDeclaration contains=scalaTypeTypeExtension skipwhite | 102 syn match scalaTypeTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeTypeDeclaration contains=scalaTypeTypeExtension skipwhite |
104 syn match scalaTypeTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals skipwhite | 103 syn match scalaTypeTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypeExtension,scalaTypeTypeEquals skipwhite |
105 syn match scalaTypeTypeEquals /=\ze[^>]/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite | 104 syn match scalaTypeTypeEquals /=\ze[^>]/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite |
106 syn match scalaTypeTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeTypeDeclaration skipwhite | 105 syn match scalaTypeTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained contains=scalaTypeOperator nextgroup=scalaTypeTypeDeclaration skipwhite |
107 syn match scalaTypeTypePostDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypePostExtension skipwhite | 106 syn match scalaTypeTypePostDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeTypePostExtension skipwhite |
108 syn match scalaTypeTypePostExtension /\%(⇒\|=>\|<:\|:>\|=:=\|::\)/ contained nextgroup=scalaTypeTypePostDeclaration skipwhite | 107 syn match scalaTypeTypePostExtension /\%(⇒\|=>\|<:\|:>\|=:=\|::\)/ contained contains=scalaTypeOperator nextgroup=scalaTypeTypePostDeclaration skipwhite |
109 hi link scalaTypeTypeDeclaration Type | 108 hi link scalaTypeTypeDeclaration Type |
110 hi link scalaTypeTypeExtension Keyword | 109 hi link scalaTypeTypeExtension Keyword |
111 hi link scalaTypeTypePostDeclaration Special | 110 hi link scalaTypeTypePostDeclaration Special |
112 hi link scalaTypeTypePostExtension Keyword | 111 hi link scalaTypeTypePostExtension Keyword |
113 | 112 |
114 syn match scalaTypeDeclaration /(/ contained nextgroup=scalaTypeExtension contains=scalaRoundBrackets skipwhite | 113 syn match scalaTypeDeclaration /(/ contained nextgroup=scalaTypeExtension contains=scalaRoundBrackets skipwhite |
115 syn match scalaTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeDeclaration contains=scalaTypeExtension skipwhite | 114 syn match scalaTypeDeclaration /\%(⇒\|=>\)\ze/ contained nextgroup=scalaTypeDeclaration contains=scalaTypeExtension skipwhite |
116 syn match scalaTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeExtension skipwhite | 115 syn match scalaTypeDeclaration /\<[_\.A-Za-z0-9$]\+\>/ contained nextgroup=scalaTypeExtension skipwhite |
117 syn match scalaTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained nextgroup=scalaTypeDeclaration skipwhite | 116 syn match scalaTypeExtension /)\?\_s*\zs\%(⇒\|=>\|<:\|:>\|=:=\|::\|#\)/ contained contains=scalaTypeOperator nextgroup=scalaTypeDeclaration skipwhite |
118 hi link scalaTypeDeclaration Type | 117 hi link scalaTypeDeclaration Type |
119 hi link scalaTypeExtension Keyword | 118 hi link scalaTypeExtension Keyword |
120 hi link scalaTypePostExtension Keyword | 119 hi link scalaTypePostExtension Keyword |
121 | 120 |
122 syn match scalaTypeAnnotation /\%([_a-zA-Z0-9$\s]:\_s*\)\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration contains=scalaRoundBrackets | 121 syn match scalaTypeAnnotation /\%([_a-zA-Z0-9$\s]:\_s*\)\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration contains=scalaRoundBrackets |
123 syn match scalaTypeAnnotation /)\_s*:\_s*\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration | 122 syn match scalaTypeAnnotation /)\_s*:\_s*\ze[_=(\.A-Za-z0-9$]\+/ skipwhite nextgroup=scalaTypeDeclaration |
124 hi link scalaTypeAnnotation Normal | 123 hi clear scalaTypeAnnotation |
125 | 124 |
126 syn match scalaCaseFollowing /\<[_\.A-Za-z0-9$]\+\>/ contained | 125 syn match scalaCaseFollowing /\<[_\.A-Za-z0-9$]\+\>/ contained contains=scalaCapitalWord |
127 syn match scalaCaseFollowing /`[^`]\+`/ contained | 126 syn match scalaCaseFollowing /`[^`]\+`/ contained contains=scalaCapitalWord |
128 hi link scalaCaseFollowing Special | 127 hi link scalaCaseFollowing Special |
129 | 128 |
130 syn keyword scalaKeywordModifier abstract override final lazy implicit implicitly private protected sealed null require super | 129 syn keyword scalaKeywordModifier abstract override final lazy implicit private protected sealed null super |
130 syn keyword scalaSpecialFunction implicitly require | |
131 hi link scalaKeywordModifier Function | 131 hi link scalaKeywordModifier Function |
132 hi link scalaSpecialFunction Function | |
132 | 133 |
133 syn keyword scalaSpecial this true false ne eq | 134 syn keyword scalaSpecial this true false ne eq |
134 syn keyword scalaSpecial new nextgroup=scalaInstanceDeclaration skipwhite | 135 syn keyword scalaSpecial new nextgroup=scalaInstanceDeclaration skipwhite |
135 syn match scalaSpecial "\%(=>\|⇒\|<-\|←\|->\|→\)" | 136 syn match scalaSpecial "\%(=>\|⇒\|<-\|←\|->\|→\)" |
136 syn match scalaSpecial /`[^`]\+`/ " Backtick literals | 137 syn match scalaSpecial /`[^`]\+`/ " Backtick literals |
150 hi link scalaTripleIString String | 151 hi link scalaTripleIString String |
151 | 152 |
152 syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained | 153 syn match scalaInterpolation /\$[a-zA-Z0-9_$]\+/ contained |
153 exe 'syn region scalaInterpolationB matchgroup=scalaInterpolationBoundary start=/\${/ end=/}/ contained contains=' . s:ContainedGroup() | 154 exe 'syn region scalaInterpolationB matchgroup=scalaInterpolationBoundary start=/\${/ end=/}/ contained contains=' . s:ContainedGroup() |
154 hi link scalaInterpolation Function | 155 hi link scalaInterpolation Function |
155 hi link scalaInterpolationB Normal | 156 hi clear scalaInterpolationB |
156 | 157 |
157 syn region scalaFString matchgroup=scalaInterpolationBrackets start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar | 158 syn region scalaFString matchgroup=scalaInterpolationBrackets start=/f"/ skip=/\\"/ end=/"/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar |
158 syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained | 159 syn match scalaFInterpolation /\$[a-zA-Z0-9_$]\+\(%[-A-Za-z0-9\.]\+\)\?/ contained |
159 exe 'syn region scalaFInterpolationB matchgroup=scalaInterpolationBoundary start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup() | 160 exe 'syn region scalaFInterpolationB matchgroup=scalaInterpolationBoundary start=/${/ end=/}\(%[-A-Za-z0-9\.]\+\)\?/ contained contains=' . s:ContainedGroup() |
160 hi link scalaFString String | 161 hi link scalaFString String |
161 hi link scalaFInterpolation Function | 162 hi link scalaFInterpolation Function |
162 hi link scalaFInterpolationB Normal | 163 hi clear scalaFInterpolationB |
163 | 164 |
164 syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar | 165 syn region scalaTripleString start=/"""/ end=/"""\%([^"]\|$\)/ contains=scalaEscapedChar,scalaUnicodeChar |
165 syn region scalaTripleFString matchgroup=scalaInterpolationBrackets start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar | 166 syn region scalaTripleFString matchgroup=scalaInterpolationBrackets start=/f"""/ end=/"""\%([^"]\|$\)/ contains=scalaFInterpolation,scalaFInterpolationB,scalaEscapedChar,scalaUnicodeChar |
166 hi link scalaTripleString String | 167 hi link scalaTripleString String |
167 hi link scalaTripleFString String | 168 hi link scalaTripleFString String |
198 hi link scalaMultilineComment Comment | 199 hi link scalaMultilineComment Comment |
199 hi link scalaDocLinks Function | 200 hi link scalaDocLinks Function |
200 hi link scalaParameterAnnotation Function | 201 hi link scalaParameterAnnotation Function |
201 hi link scalaParamAnnotationValue Keyword | 202 hi link scalaParamAnnotationValue Keyword |
202 hi link scalaCommentAnnotation Function | 203 hi link scalaCommentAnnotation Function |
203 hi link scalaCommentCodeBlockBrackets String | |
204 hi link scalaCommentCodeBlock String | 204 hi link scalaCommentCodeBlock String |
205 hi link scalaTodo Todo | 205 hi link scalaTodo Todo |
206 | 206 |
207 syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/ | 207 syn match scalaAnnotation /@\<[`_A-Za-z0-9$]\+\>/ |
208 hi link scalaAnnotation PreProc | 208 hi link scalaAnnotation PreProc |