You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think what we should do eventually is make our own custom Completion data type and return a List[CompletionItem] instead of a `List[Symbol], it could be defined a bit like this:
This way we can handle completions with no symbol (wildcards, structural types) and multiple symbols (both a class and an object exist, ...) in a uniform way. For example when there's both a class and an object, we could have the documentation field contain the documentation for both.
instead of just showing the full name we could show the kind of the symbol too, e.g. "class a.b.c.Foo", "val x", ... and in the case where there's more than one symbol with the same name, we could show both at the same time "class and object a.b.c.Foo", ... We can reuse the code used in the REPL when printing a declaration.
One `Completion` represents one completion results that should be
included in the list of completion options. It can represent zero
symbols (for instance, a wildcard import), or more than one (a class and
its companion object). Each `Completion` also has a `description` which
should be displayed in the tool that shows the completion candidates.
Fixesscala#5508
One `Completion` represents one completion results that should be
included in the list of completion options. It can represent zero
symbols (for instance, a wildcard import), or more than one (a class and
its companion object). Each `Completion` also has a `description` which
should be displayed in the tool that shows the completion candidates.
Fixesscala#5508
Originally posted by @smarter in #5476 (comment)
The text was updated successfully, but these errors were encountered: