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
Strike out usage of deprecated symbols #309
Comments
I was thinking that maybe semantic tokens could help here, but it seems that setting deprecated doesn't do anything currently 🤔 It might depend on the theme? Or maybe something is wrong in the semantic highlight PR? Or the modifier don't do anything right now. Not sure. The best approach now is to rely on |
Note that in Scala 3 everything is there to instead give that diagnostics an errorMessageID and we could just detect that. As of 3.2.x they are being forwarded and Mill and sbt are also forwarding them for us to use. |
Och, we might also need to change that in Bloop. Do you have any links to how it's being handled in sbt? Coming back to semantic tokens, it does actually work, but is limited by the theme. By doing:
I was able to get it to work. Also changed the color for keyword, which might not have been the best choice 😅 |
Plus side of this approach is that we will be able to mark things as deprecated without the additional diagnostics. |
@tgodzik will just following work? "editor.semanticTokenColorCustomizations": {
"rules": {
"*.deprecated": {
"fontStyle": "strikethrough"
}
}
}
and if yes, is it possible for extension to contribute to editor settings? 🤔 |
I started work on this in scalacenter/bloop#1750. Everything should be there, but I had some ScalaJS failures that I never had time to look into. |
Is your feature request related to a problem? Please describe.
When I use deprecated method, in completions I see that it's deprecated, but after choosing completion, method is rendered as normal one.
Describe the solution you'd like
It should be visible that symbol is deprecated, for instance example from rust:
There is
DiagnosticTag
for that purpose in diagnostic. I don't know if this can be achieved in other way than through diagnostics.Describe alternatives you've considered
rely on scalac's
deprecation
and compilation warningsdeprecation
flagAdditional context
No response
Search terms
deprecation diagnostics
The text was updated successfully, but these errors were encountered: