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

Label should not contain long descriptions #7004

Open
tgodzik opened this issue Dec 4, 2024 · 2 comments
Open

Label should not contain long descriptions #7004

tgodzik opened this issue Dec 4, 2024 · 2 comments
Labels
bug Something that is making a piece of functionality unusable Scala 3 Generic ticket relating to Scala 3

Comments

@tgodzik
Copy link
Contributor

tgodzik commented Dec 4, 2024

Describe the bug

@main
def run = 
  (1, 2).to@@

will show inserted description in the label as well as in the details.

Expected behavior

We should only have a summary in the label.

Operating system

Linux

Editor/Extension

None

Version of Metals

v1.4.1

Extra context or search terms

Raised in scalameta/metals-zed#34

@tgodzik tgodzik added bug Something that is making a piece of functionality unusable Scala 3 Generic ticket relating to Scala 3 labels Dec 4, 2024
@kasiaMarek kasiaMarek self-assigned this Dec 11, 2024
@kasiaMarek
Copy link
Contributor

This is how it looks like in VSCode:
Screenshot 2024-12-11 at 16 06 34
We can try:

  • not to dealias the type ref if it is a match type (dealiasing here seems to be done by the compiler, so it might be problematic)
  • try to print it in single line in label (+ trim if too long), e.g.
    • if the type is multiline we could parse it and print with ';' where necessary
    • add option to compiler printer to print without \n

@kasiaMarek kasiaMarek removed their assignment Dec 11, 2024
@tgodzik
Copy link
Contributor Author

tgodzik commented Dec 12, 2024

Could we do some kind of shorter description like (Int, Int) match {...} (Match Type) since it's anyway not enough room to present the whole expression?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that is making a piece of functionality unusable Scala 3 Generic ticket relating to Scala 3
Projects
Status: Triage
Development

No branches or pull requests

2 participants