scalameta / metals-feature-requests

Issue tracker for Metals feature requests
37 stars 4 forks source link

Improvements for `documentSymbol` #375

Open jpaju opened 7 months ago

jpaju commented 7 months ago

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

No, purely a feature request.

Describe the solution you'd like

Document symbol request currently does not include constructor parameters (neither for classes or case classes) nor bindings in for comprehension. I think it would make sense to support symbols in both of these contexts.

Classes

Currently when querying for documentSymbols for this:

final case class Person(foo: String):
  val bar = 1

Currently: reported symbols are Person and bar. Desired: reported symbols are Person, foo and bar.

For comprehensions

for 
  n <- List(...)
yield n

Currently: reported symbols are none Desired: reported symbols are n

Describe alternatives you've considered

Not really sure if there is any alternatives.

Additional context

No response

Search terms

documentSymbol constructor class for-comprehension