Metals: Hover shows wrong information

Created on 31 Mar 2019  路  3Comments  路  Source: scalameta/metals

Describe the bug

I noticed that hover sometimes shows a tooltip that looks different (broken formatting) and for the wrong symbol.

To Reproduce

I tried it out on the atom-ide-scala code:

https://github.com/laughedelic/atom-ide-scala/blob/8684c979ebd6561e43bffd31349d76eb2f24018f/src/main/scala/ScalaLanguageClient.scala#L64

Expected behavior

Tooltip with information for the symbol/expression under the cursor.

Screenshots

Screenshot 2019-03-30 at 02 21 33
Screenshot 2019-03-31 at 01 29 24

Notice that both of these symbols appear inside of the NotificationOptions constructor.

Installation:

  • Operating system: macOS
  • Editor: Atom
  • Metals version: v0.4.4-209-gf6986d46 (latest master at the moment of writing)
bug

All 3 comments

Reproducible in VS Code as well:

Screenshot 2019-03-31 at 01 38 49

Thanks for reporting! This is due to buggy handling of named arguments

Pending "fix" in #602. It's not a great fix because now hover shows the full method signature instead of only the parameter signature.

Was this page helpful?
0 / 5 - 0 ratings