Skip to content

IntelliSense uses the wrong icons for some completion result types #3364

Closed
PowerShell/PowerShellEditorServices
#1738
@MartinGC94

Description

@MartinGC94

Issue Description

See the following screenshot:
image

A lot of them seem to use the text icon even though VS code includes icons that are more appropriate.
VS Code icons can be found here: https://code.visualstudio.com/api/references/icons-in-labels#icon-listing all of the icons intended for IntelliSense start with "Symbol-"

If I had to map them I would map them like this:

Text              = symbol-text
History           = symbol-reference (Or if we don't limit ourselves to the symbol- icons: history)
Command           = symbol-function
ProviderItem      = symbol-file
ProviderContainer = symbol-folder
Property          = symbol-property
Method            = symbol-method
ParameterName     = symbol-parameter
ParameterValue    = symbol-value
Variable          = symbol-variable
Namespace         = symbol-namespace
Type              = symbol-class
Keyword           = symbol-keyword
DynamicKeyword    = symbol-keyword (Or if we don't want the same icon for 2 different types: symbol-misc)

It's probably worth checking the seemingly working mappings as well because people can customize the icons and if Command and Method for example are both mapped to symbol-function then their icon theme will have to compromise.

If you want to see this for yourself you can use the following code:

function DummyFunction
{
    Param
    (
        [ArgumentCompleter(
        {
            [System.Enum]::GetNames([System.Management.Automation.CompletionResultType]) | ForEach-Object -Process {
                [System.Management.Automation.CompletionResult]::new($_,$_,$_,"ToolTip")
            }
        }
        )]
        $Param1
    )
}

and then try to complete Param1 for the DummyFunction

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions