Some import suggestions from ZIO don't appear
brndt opened this issue · comments
Describe the bug
-
Try to type "IO" or "ULayer" type (as an example) from zio package
-
VS Code doesn't suggest to import these types
Expected behavior
VS Code should suggest to import these types as well as it does for other zio-related stuff
Operating system
macOS
Editor/Extension
VS Code
Version of Metals
v1.2.2
Extra context or search terms
No response
Thanks for reporting! Do you perhaps have a snippet that this doesn't work in? That would be super useful. Also, which version of zio you are using just in case
Thanks for reporting! Do you perhaps have a snippet that this doesn't work in? That would be super useful. Also, which version of zio you are using just in case
Try to execute this code in VS Code and you'll see it doesn't suggest to import IO
from zio, neither handler
from zio-http:
https://scastie.scala-lang.org/vPVpOnCcTBWbG09PR4xmDg
Currently for library dependencies Metals only suggests auto-imports for class
/object
/trait
, and can't handle methods like handler
or type aliases like IO
.
I think it would be great to suggest them too.
Maybe if we only did it for toplevel object or package objects that would be fine? Though it would be needed to check the implications and whether the indexing wouldn't get much worse.
It's a feature request though at this point, so will open up as a follow up.