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

No editor help/features for enum utility methods #7266

Open
ckipp01 opened this issue Mar 3, 2025 · 0 comments
Open

No editor help/features for enum utility methods #7266

ckipp01 opened this issue Mar 3, 2025 · 0 comments
Labels
bug Something that is making a piece of functionality unusable presentation-compiler Something relating to the presentation compiler Scala 3 Generic ticket relating to Scala 3

Comments

@ckipp01
Copy link
Member

ckipp01 commented Mar 3, 2025

Describe the bug

Given a piece of code like this:

enum Foo(val key: String) {
  case Bar extends Foo("b")
  case Baz extends Foo("z")
}

object Foo {
  def parse(key: String) = Foo.valueOf("b")
}

If a user is unfamiliar with valueOf they will try to hover on it or go to the definition of valueOf. However, if you trigger a go to definition on valueOf it just brings you tot he Foo object definition. It also offers no hover information.

Expected behavior

I'd expect to be able to navigate to the definition of valueOf to see for example what happens if the value isn't found or to just generally see information about it.

Note: This is using Scala 3.6.3

Operating system

macOS

Editor/Extension

Nvim/Vim (other)

Version of Metals

1.5.1+89-6ab135fb-SNAPSHOT

Extra context or search terms

No response

@tgodzik tgodzik added bug Something that is making a piece of functionality unusable Scala 3 Generic ticket relating to Scala 3 presentation-compiler Something relating to the presentation compiler labels Mar 3, 2025
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 presentation-compiler Something relating to the presentation compiler Scala 3 Generic ticket relating to Scala 3
Projects
None yet
Development

No branches or pull requests

2 participants