From e044f6904767ae3f106d349d32d8e078f9053474 Mon Sep 17 00:00:00 2001 From: Doug Kearns Date: Mon, 20 Sep 2021 00:55:59 +1000 Subject: [PATCH] syntax: Fix nested multiline comments --- syntax/scala.vim | 2 +- syntax/testfile.scala | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/syntax/scala.vim b/syntax/scala.vim index bb0fe0a..6089369 100644 --- a/syntax/scala.vim +++ b/syntax/scala.vim @@ -188,7 +188,7 @@ hi link scalaTypeOperator Keyword hi link scalaTypeAnnotationParameter Function syn match scalaShebang "\%^#!.*" display -syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@Spell keepend fold +syn region scalaMultilineComment start="/\*" end="\*/" contains=scalaMultilineComment,scalaDocLinks,scalaParameterAnnotation,scalaCommentAnnotation,scalaTodo,scalaCommentCodeBlock,@Spell keepend extend fold syn match scalaCommentAnnotation "@[_A-Za-z0-9$]\+" contained syn match scalaParameterAnnotation "\%(@tparam\|@param\|@see\)" nextgroup=scalaParamAnnotationValue skipwhite contained syn match scalaParamAnnotationValue /[.`_A-Za-z0-9$]\+/ contained diff --git a/syntax/testfile.scala b/syntax/testfile.scala index 1790c6f..d9841d1 100644 --- a/syntax/testfile.scala +++ b/syntax/testfile.scala @@ -57,6 +57,8 @@ class ScalaClass(i: Int = 12, b: Trait[A, Trait[B, C]]) extends B with SomeTrait * *
  • * + * /* a nested block comment */ + * * @param parameter Explanation of the parameter. Speling. * @return TODO */