Vscode-cpptools: New icons for completion and symbols (operators, structs/unions, enum values, template arguments, macros)

Created on 22 Nov 2018  路  7Comments  路  Source: microsoft/vscode-cpptools

Let us know if anyone has any problems with our icon usage.

Operators (previously used the function/method icon):
image
Structs/Unions (previously used the Class icon):
image
Enum values (previously used the Enum icon):
image
Template arguments (previously used the Enum icon):
image
Typedefs and using aliases (previously used the Class icon for symbols and the Enum icon for completion). We're using the "interface" icon for typedefs/aliases because VS Code provides no other alternative that is closer to the icon Visual Studio uses (extra (typedef) and (type alias) text should alleviate the confusion):
image
Macros/defines (previously used the Enum icon):
image
Folders (or symlinks to folders) (previously only files were selectable in #include completion):
image
Symbolic links to files (previously used the File icon corresponding to the symlink's type, not the target's type): This is possible, but I removed it because it doesn't seem to be worth it to check if every file is a symlink or not, just to have a different icon. Symlinks that are folders will appear as folders, which is the most important thing.
image.

Unchanged icons:
Classes/templates:
image
Enum types:
image
Functions/methods/constructors:
image
Member fields/variables:
image
Variables:
image
Namespaces:
image

Feature Request Language Service bug fixed (release pending)

Most helpful comment

@andrew-r-king Yes, the icon image is (will be) based on the theme. E.g.
image

All 7 comments

Can you distinguish declaration and definition using different icons for function?

@xiaoyongdong Not currently. Visual Studio supports that icon type (arrow over the purple cube for declarations) -- I've added a feature request for VS Code at https://github.com/Microsoft/vscode/issues/63617 . You could add to that issue if you think of other icons we should add as well.

We might be able to add text like "(declaration)" to the symbol name...or we might have to switch to the new DocumentSymbol API first: https://github.com/Microsoft/vscode-cpptools/issues/2230 .

@xiaoyongdong Adding (declaration) text to the end of the symbol seems to be a workaround for the icon deficiences: https://github.com/Microsoft/vscode-cpptools/issues/2851 .

@sean-mcmanus Thank you! According to you it maybe the best way currently if extension can't use different icons.

Does the #include completion use the theme's folder icon if it's present?

@andrew-r-king Yes, the icon image is (will be) based on the theme. E.g.
image

Updated icons/symbol info is supported now with our latest Insiders release: https://github.com/Microsoft/vscode-cpptools/releases . If you're using VS Code Insiders or have http.proxySupport not set to "off", you might not get the 0.21.0-insiders2 update automatically with C_Cpp.updateChannel set to "Insiders".

Was this page helpful?
0 / 5 - 0 ratings

Related issues

montery8 picture montery8  路  3Comments

DemoCrazer picture DemoCrazer  路  3Comments

chrisckc picture chrisckc  路  3Comments

jheinzel picture jheinzel  路  3Comments

narutse picture narutse  路  3Comments