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

Show Scaladoc for inner methods and values on hover (Scala 3) #415

Open
kasiaMarek opened this issue Jan 17, 2025 · 0 comments
Open

Show Scaladoc for inner methods and values on hover (Scala 3) #415

kasiaMarek opened this issue Jan 17, 2025 · 0 comments

Comments

@kasiaMarek
Copy link

Is your feature request related to a problem? Please describe.

Sometimes when methods are long and have multiple local definitions, it would be useful if Metals showed Scaladoc for local definitions on hover.

Describe the solution you'd like

/** Ooopsie daisy */
def computeLogicOwners(): Unit =
  /** This is a comment */
  val logicOwners = ???

Currently hover on logicOwners shows:

val logicOwners: Nothing

with this feature it would show:

val logicOwners: Nothing
This is a comment 

Possible mechanism

Docstrings are currently collected in Metals using Mtags but for local symbols, we should be able to get them from pc directly.

Describe alternatives you've considered

Using go to definition to find the definition of local symbol and reading the attached Scaladoc/comment.

Additional context

Original issue: scalameta/metals#7093

Search terms

hover scaladoc local

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

1 participant