vscode-scala-syntax icon indicating copy to clipboard operation
vscode-scala-syntax copied to clipboard

Syntax highlighting in code comments

Open Jentsch opened this issue 1 year ago • 3 comments

I really like the idea of sbt-example, but also aside that it would be nice to have some (minimal) highlighting for code in comments.

/**
 * Usage:
 * {{{
 * def x: String = toString(2)
 * }}}
 */
def toString...

Do you think that would be useful to have?

Jentsch avatar Oct 09 '24 16:10 Jentsch

That would be useful, same as with @ scaladoc variables.

tgodzik avatar Oct 09 '24 16:10 tgodzik

While working on #277 I noticed that with metals all doc tags had the right highlighting, without metals some tags weren't highlighted. Does that means, that if we highlight doc variables or code in comments here in a project with metals that wouldn't change anything?

Jentsch avatar Oct 09 '24 19:10 Jentsch

Hmm... We might have added it in semantic highlight at some point, but changing here is useful as it's also the syntax highlight on github itself. And semantic highlight might not always work.

tgodzik avatar Oct 10 '24 13:10 tgodzik