New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More types for CompletionItemKind enum #2628

Closed
rkeithhill opened this Issue Feb 2, 2016 · 40 comments

Comments

Projects
None yet
8 participants
@rkeithhill

rkeithhill commented Feb 2, 2016

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.

@daviwil

This comment has been minimized.

Show comment
Hide comment
@daviwil

daviwil Feb 2, 2016

Contributor

Agreed, this would be great to have!

Contributor

daviwil commented Feb 2, 2016

Agreed, this would be great to have!

@jrieken jrieken self-assigned this Feb 2, 2016

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken
Member

jrieken commented Feb 2, 2016

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Mar 16, 2016

Member

related #4201

Member

jrieken commented Mar 16, 2016

related #4201

@jrieken jrieken changed the title from Add Folder (or Directory) to the CompletionItemKind enum to More types for CompletionItemKind enum May 25, 2016

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken May 25, 2016

Member
  • Folder/Directory
  • Event (#5407)
Member

jrieken commented May 25, 2016

  • Folder/Directory
  • Event (#5407)
@Jerry-Hong

This comment has been minimized.

Show comment
Hide comment
@Jerry-Hong

Jerry-Hong Jul 17, 2016

@jrieken Can I use it now?

Jerry-Hong commented Jul 17, 2016

@jrieken Can I use it now?

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Jul 20, 2016

Member

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

Member

jrieken commented Jul 20, 2016

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

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Jan 24, 2017

Member

Looking forward to this.

Member

DustinCampbell commented Jan 24, 2017

Looking forward to this.

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Jan 24, 2017

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.

Member

DustinCampbell commented Jan 24, 2017

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.

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Jan 25, 2017

Member

Yeah, our plan is to allow for custom icons

Member

jrieken commented Jan 25, 2017

Yeah, our plan is to allow for custom icons

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Jan 25, 2017

Member

cc @chrisdias

Please excuse the sarcasm in my response below @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

Member

DustinCampbell commented Jan 25, 2017

cc @chrisdias

Please excuse the sarcasm in my response below @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

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Jan 25, 2017

Member

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.

Member

jrieken commented Jan 25, 2017

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.

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Jan 25, 2017

Member

Oh, you didn't ruin my morning at all Joh. 😄

I'm willing to be part of any conversation about determining the 'common denominator' set of icons. I even promise to not push for making the common denominator just the set required by C#. 😄

Member

DustinCampbell commented Jan 25, 2017

Oh, you didn't ruin my morning at all Joh. 😄

I'm willing to be part of any conversation about determining the 'common denominator' set of icons. I even promise to not push for making the common denominator just the set required by C#. 😄

@jrieken jrieken added this to the February 2017 milestone Jan 25, 2017

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Jan 25, 2017

Member

Perfect. We are now in the Jan endgame. I'll schedule this for Feb and get in touch with you when it's time.

Member

jrieken commented Jan 25, 2017

Perfect. We are now in the Jan endgame. I'll schedule this for Feb and get in touch with you when it's time.

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Jan 25, 2017

Member

Sounds good. You might want to include @markw-t from the VS editor team as well.

Member

DustinCampbell commented Jan 25, 2017

Sounds good. You might want to include @markw-t from the VS editor team as well.

@markw-t

This comment has been minimized.

Show comment
Hide comment
@markw-t

markw-t Jan 25, 2017

Thanks for the add guys. It makes perfect sense to me that Visual Studio Code extenders would be able to create parity experiences to Visual Studio without creating custom art - a single "Visual Studio Family" experience should be possible in completion lists like this as @DustinCampbell suggests above; so the Visual Studio Code default set should include all the values found in the Visual Studio enum if possible.

markw-t commented Jan 25, 2017

Thanks for the add guys. It makes perfect sense to me that Visual Studio Code extenders would be able to create parity experiences to Visual Studio without creating custom art - a single "Visual Studio Family" experience should be possible in completion lists like this as @DustinCampbell suggests above; so the Visual Studio Code default set should include all the values found in the Visual Studio enum if possible.

@kieferrm kieferrm referenced this issue Feb 6, 2017

Closed

February Iteration Plan #20021

36 of 38 tasks complete
@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Feb 20, 2017

Member

Sorry, this has slipped. Blame me for being on vacations 🌴. Moving to March

Member

jrieken commented Feb 20, 2017

Sorry, this has slipped. Blame me for being on vacations 🌴. Moving to March

@jrieken jrieken modified the milestones: March 2017, February 2017 Feb 20, 2017

@kieferrm kieferrm referenced this issue Mar 3, 2017

Closed

March Iteration Plan #21923

54 of 58 tasks complete
@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Mar 21, 2017

Member

Let's start to tackle this by adding some more common-denominator icons. I'd like to propose that we for now leave the modifier icons out of the equation. It's a little unlucky that we have called it CompletionItemKind and SymbolKind and I have the feeling we shouldn't add all variants in there but add the concept of a KindModifier such that both can determine the visual representation of something.

For the set of common icons we have things like Snippet, Color or File that describe more or less literals and things that occur in programming languages, like Function or Interface. In #2628 (comment) @DustinCampbell suggests to add more icons to the latter bucket which is OK with me as long as we don't make it too specific for a single language.

Can we come with a N-programming-languages-have-this-rule? For instance, more than N programming languages support interfaces so we have CompletionItemKind.Interface. Unsure what N should be, for sure N > 1 maybe something around 3-5 of the most commonly used languages.

Member

jrieken commented Mar 21, 2017

Let's start to tackle this by adding some more common-denominator icons. I'd like to propose that we for now leave the modifier icons out of the equation. It's a little unlucky that we have called it CompletionItemKind and SymbolKind and I have the feeling we shouldn't add all variants in there but add the concept of a KindModifier such that both can determine the visual representation of something.

For the set of common icons we have things like Snippet, Color or File that describe more or less literals and things that occur in programming languages, like Function or Interface. In #2628 (comment) @DustinCampbell suggests to add more icons to the latter bucket which is OK with me as long as we don't make it too specific for a single language.

Can we come with a N-programming-languages-have-this-rule? For instance, more than N programming languages support interfaces so we have CompletionItemKind.Interface. Unsure what N should be, for sure N > 1 maybe something around 3-5 of the most commonly used languages.

jrieken added a commit that referenced this issue Mar 22, 2017

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Mar 22, 2017

Member
  • added enumeration member as vscode.CompletionItemKind.EnumMember. Should go together with CompletionKindKind.Enum. N-languages-have-this-rule justification: C, C++, C#, Swift, TypeScript, Java etc...
Member

jrieken commented Mar 22, 2017

  • added enumeration member as vscode.CompletionItemKind.EnumMember. Should go together with CompletionKindKind.Enum. N-languages-have-this-rule justification: C, C++, C#, Swift, TypeScript, Java etc...
@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Apr 5, 2017

Member

Extension Method makes sense to leave off. Event is the one I'm probably most interested in. I figure that's probably used a ton since it appears in all the .NET languages (i.e. C#, F#, VB, PowerShell, etc.) plus other languages like HTML:

image

Member

DustinCampbell commented Apr 5, 2017

Extension Method makes sense to leave off. Event is the one I'm probably most interested in. I figure that's probably used a ton since it appears in all the .NET languages (i.e. C#, F#, VB, PowerShell, etc.) plus other languages like HTML:

image

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Apr 5, 2017

Member

True - I have forget that one.

Member

jrieken commented Apr 5, 2017

True - I have forget that one.

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Apr 18, 2017

Member

Added 'Event' and 'Operator', unsure what icon to use for TypeParam. fyi @aeschli about the Event completion kind and above sample

Member

jrieken commented Apr 18, 2017

Added 'Event' and 'Operator', unsure what icon to use for TypeParam. fyi @aeschli about the Event completion kind and above sample

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Apr 18, 2017

Member

The one we use for C# and Visual Basic in VS looks like this:

image

I think C++ uses something different.

Member

DustinCampbell commented Apr 18, 2017

The one we use for C# and Visual Basic in VS looks like this:

image

I think C++ uses something different.

jrieken added a commit that referenced this issue Apr 19, 2017

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Apr 19, 2017

Member

I have found this one which fits Foo<T> but also reminds me of a word processor...

screen shot 2017-04-19 at 10 05 49

Member

jrieken commented Apr 19, 2017

I have found this one which fits Foo<T> but also reminds me of a word processor...

screen shot 2017-04-19 at 10 05 49

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Apr 19, 2017

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.

Member

DustinCampbell commented Apr 19, 2017

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.

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Apr 19, 2017

Member

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

Member

jrieken commented Apr 19, 2017

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

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Apr 19, 2017

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.

Member

DustinCampbell commented Apr 19, 2017

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.

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Apr 21, 2017

Member

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

Member

jrieken commented Apr 21, 2017

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

@jrieken jrieken closed this Apr 21, 2017

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Apr 21, 2017

Member

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

Member

DustinCampbell commented Apr 21, 2017

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

@chrmarti

This comment has been minimized.

Show comment
Hide comment
@chrmarti

chrmarti Apr 26, 2017

Contributor

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.)

Contributor

chrmarti commented Apr 26, 2017

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.)

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Oct 24, 2017

Member

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

Member

DustinCampbell commented Oct 24, 2017

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

@jrieken

This comment has been minimized.

Show comment
Hide comment
@jrieken

jrieken Oct 25, 2017

Member

@dbaeumer will know

Member

jrieken commented Oct 25, 2017

@dbaeumer will know

@dbaeumer

This comment has been minimized.

Show comment
Hide comment
@dbaeumer
Member

dbaeumer commented Oct 25, 2017

@DustinCampbell

This comment has been minimized.

Show comment
Hide comment
@DustinCampbell

DustinCampbell Oct 25, 2017

Member

Thank you sir!

Member

DustinCampbell commented Oct 25, 2017

Thank you sir!

@DustinCampbell DustinCampbell referenced this issue Oct 25, 2017

Merged

[Alpha] Language Server Protocol #969

12 of 46 tasks complete

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.