Skip to content

More types for CompletionItemKind enum #2628

Closed

Description

@rkeithhill

And then add an appropriate icon to display in completion lists. The PowerShellEditorServices extension helps the user auto-complete paths. When you have a list of folder contents it is very helpful to have an icon to distinguish between files and folders.

Compare this UI from VSCode for path completion:
vscodeintellisenseforfolders

To the UI from PowerShell ISE:
iseintellisenseforfolders
Having a nice, flat icon for a folder would be very nice to show in this list.

Activity

  1. daviwil commented on Feb 2, 2016

    @daviwil
    Contributor

    Agreed, this would be great to have!

  2. jrieken commented on Feb 2, 2016

    @jrieken
    Contributor
  3. jrieken commented on Mar 16, 2016

    @jrieken
    Contributor

    related #4201

  4. changed the title [-]Add Folder (or Directory) to the CompletionItemKind enum[/-] [+]More types for CompletionItemKind enum[/+] on May 25, 2016
  5. jrieken commented on May 25, 2016

    @jrieken
    Contributor
  6. Jerry-Hong commented on Jul 17, 2016

    @Jerry-Hong

    Johannes Rieken (@jrieken) Can I use it now?

  7. jrieken commented on Jul 20, 2016

    @jrieken
    Contributor

    JerryHong (@Jerry-Hong) If by it you mean the currently existing ComplemtionItemKind member "yes". Otherwise you have to wait until this issue is resolved ;-)

  8. DustinCampbell commented on Jan 24, 2017

    @DustinCampbell
    Member

    Looking forward to this.

  9. DustinCampbell commented on Jan 24, 2017

    @DustinCampbell
    Member

    And FWIW, it'd be great to get several more of the icons from VS. We use many of these for C# in VS completion and finding analogs in VS Code is always a bit of a compromise.

    Here are icons for which there is no good representation in VS Code's CompletionItemKind:

    • Event
    • Struct
    • Delegate
    • Extension method
    • Constant
    • Enum member
    • Operator
    • Type parameter
    • Versions of all icons with accessibility overlays (e.g. private, protected, internal, etc.)

    Here's the basic list of what we use in completion: https://github.com/dotnet/roslyn/blob/master/src/Features/Core/Portable/Completion/CompletionTags.cs

    This is the level of detail we use for Visual Studio: https://github.com/dotnet/roslyn/blob/master/src/Features/Core/Portable/Shared/Extensions/ISymbolExtensions_2.cs#L14-L169

    It'd be great if I could replicate the icons in VS Code.

  10. jrieken commented on Jan 25, 2017

    @jrieken
    Contributor

    Yeah, our plan is to allow for custom icons

  11. DustinCampbell commented on Jan 25, 2017

    @DustinCampbell
    Member

    cc Chris Dias (@chrisdias)

    Please excuse the sarcasm in my response below Johannes Rieken (@jrieken). I will buy whatever beers are needed to make up, but I need to make a point.

    I suppose that would address the problem in some sense. However, it does seem a bit weird that we'd be providing "custom" icons from Visual Studio to workaround the issue that Visual Studio Code doesn't provide the appropriate Visual Studio artwork to support a Visual Studio language. It's seriously weird that Visual Studio artwork is provided for "Enum" while the Visual Studio artwork for "Enum Member" is not included. Rather than fix the oversight, the solution is to force all language extensions to provide that artwork (which would be Visual Studio's artwork if they want to stay consistent) themselves? I thought that Visual Studio Code had intended to standardize on the look and feel of Visual Studio at one point. Does that not include standardizing on important pieces of artwork that are included in the Visual Studio family of products?

    Will custom icons be supported by the language server protocol if we choose to implement that at some point? If not, how will extensions that provide Visual Studio language support for Visual Studio Code via the language server protocol (e.g. C++) be able to implement completion in a way that is Visual Studio-grade?

    Even TypeScript provides overlays for member accessibility in Visual Studio (using the same artwork C# and other languages in Visual Studio do).

    image

    However, it can't do the same in Visual Studio Code:

    image

  12. jrieken commented on Jan 25, 2017

    @jrieken
    Contributor

    Sorry that I have ruined your morning ;-).

    I guess my previous comment was a bit too short and didn't explain enough. Saying that we will eventually allow for custom icons doesn't exclude adding more default icons. However, the problem is unbounded and currently we are caught in a catch up game. There is no answer to what the full set of icons is, so we can either keep it simple (like an enum member is just a member), allow for custom icons, or keep adding more icons.

    Talking about the language server protocol and other editors I honestly don't know what's best: Think of the icon for 'extension method' which isn't a frequently occurring feature in programming languages. Will someone draw an icon that fits into Atom and Sublime? Will someone just copy the icons we ship? Will an existing icon be overloaded/reused, say 'method'?

    So far we have been guided by a somewhat fuzzy 'common denominator' approach to fit most programming languages and things like access modifiers fit nicely into that but it also means we cannot cover everything from any language.

  13. 34 remaining items

  14. DustinCampbell commented on Apr 19, 2017

    @DustinCampbell
    Member

    I might be wrong, but I think that's what C++ uses for templates. For us, that always felt a little "on the nose", if you get my meaning. A little too precise. That said, I'm comfortable with what you decide to pick.

  15. jrieken commented on Apr 19, 2017

    @jrieken
    Contributor

    I understand, and the icon is labeled as template but I couldn't find the T-icon. Nothing we cannot change later, what matters is that the kinds are exposed in the api

  16. DustinCampbell commented on Apr 19, 2017

    @DustinCampbell
    Member

    I haven't looked in the image library in awhile, but if it helps, C# uses the image indexed by GlyphGroupType in Microsoft.VisualStudio.Language.IntelliSense.StandardGlyphGroup.

  17. jrieken commented on Apr 21, 2017

    @jrieken
    Contributor

    Closing this since we now have these completion item kinds. We can still change icons via separate issues. Happy Coding!

  18. DustinCampbell commented on Apr 21, 2017

    @DustinCampbell
    Member

    Thanks for your work here Johannes Rieken (@jrieken)! I'm really looking forward to using these.

  19. chrmarti commented on Apr 26, 2017

    @chrmarti
    Collaborator

    screen shot 2017-04-26 at 4 00 02 pm
    screen shot 2017-04-26 at 4 00 16 pm
    screen shot 2017-04-26 at 4 00 23 pm
    screen shot 2017-04-26 at 4 00 55 pm
    screen shot 2017-04-26 at 4 01 11 pm
    screen shot 2017-04-26 at 4 01 33 pm

    LGTM, verified. (Note that the lists are not identical, I assume that's by design.)

  20. DustinCampbell commented on Oct 24, 2017

    @DustinCampbell
    Member

    Johannes Rieken (@jrieken): Any idea when these icons will make their way into the LSP?

  21. jrieken commented on Oct 25, 2017

    @jrieken
    Contributor
  22. dbaeumer commented on Oct 25, 2017

    @dbaeumer
    Member
  23. DustinCampbell commented on Oct 25, 2017

    @DustinCampbell
    Member

    Thank you sir!

  24. locked and limited conversation to collaborators on Nov 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

apifeature-requestRequest for new features or functionalityverification-neededVerification of issue is requestedverifiedVerification succeeded

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions