Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting in code comments #276

Open
Jentsch opened this issue Oct 9, 2024 · 3 comments
Open

Syntax highlighting in code comments #276

Jentsch opened this issue Oct 9, 2024 · 3 comments

Comments

@Jentsch
Copy link
Contributor

Jentsch commented Oct 9, 2024

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?

@tgodzik
Copy link
Contributor

tgodzik commented Oct 9, 2024

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

@Jentsch
Copy link
Contributor Author

Jentsch commented Oct 9, 2024

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?

@tgodzik
Copy link
Contributor

tgodzik commented Oct 10, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants