9
9
10
10
scriptencoding utf- 8
11
11
12
+ let b: current_syntax = " scala"
13
+
12
14
" Allows for embedding, see #59; main_syntax convention instead? Refactor TOP
15
+ "
16
+ " The @Spell here is a weird hack, it means *exclude* if the first group is
17
+ " TOP. Otherwise we get spelling errors highlighted on code elements that
18
+ " match scalaBlock, even with `syn spell notoplevel`.
13
19
function ! s: ContainedGroup ()
14
20
try
15
21
silent syn list @s cala
16
- return ' @scala'
22
+ return ' @scala,@NoSpell '
17
23
catch /E392/
18
- return ' TOP'
24
+ return ' TOP,@Spell '
19
25
endtry
20
26
endfunction
21
27
@@ -157,7 +163,7 @@ syn match scalaTypeAnnotationParameter /@\<[`_A-Za-z0-9$]\+\>/ contained
157
163
hi link scalaTypeOperator Keyword
158
164
hi link scalaTypeAnnotationParameter Function
159
165
160
- syn region scalaMultilineComment start =" /\* " end =" \* /" contains =scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaCommentCodeBlock,@scalaHtml keepend
166
+ syn region scalaMultilineComment start =" /\* " end =" \* /" contains =scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaCommentCodeBlock,@scalaHtml,@Spell keepend
161
167
syn match scalaCommentAnnotation " @[_A-Za-z0-9$]\+ " contained
162
168
syn match scalaParameterAnnotation " @param" nextgroup =scalaParamAnnotationValue skipwhite contained
163
169
syn match scalaParamAnnotationValue / [`_A-Za-z0-9$]\+ / contained
@@ -173,7 +179,7 @@ hi link scalaCommentCodeBlock String
173
179
syn match scalaAnnotation / @\< [`_A-Za-z0-9$]\+\> /
174
180
hi link scalaAnnotation PreProc
175
181
176
- syn match scalaTrailingComment " //.*$"
182
+ syn match scalaTrailingComment " //.*$" contains = @Spell
177
183
hi link scalaTrailingComment Comment
178
184
179
185
syn match scalaAkkaFSM / goto([^)]*)\_ s\+\< using\> / contains =scalaAkkaFSMGotoUsing
0 commit comments