Skip to content

Nerd Font glyphs not used (for top-level commands) #437

Description

@Daniel-Moench

Describe the bug
With a Nerd Font setup (#350), the glyphs are not actually used (on the top level command).

To Reproduce

  • Install a nerd font and setup your terminal to use it. (for me "FiraCode Nerd Font Mono" in Windows Terminal @ Windows 11)
  • set useNerdFont=true in ~/.config/inshellisense/rc.toml
  • start a new session (for me is -s pwsh or cmd)
    • ensure glyphs are actually rendered, e.g.
    Write-Host "`u{E702} git  `u{E7B0} docker  `u{E709} github  `u{ED0D} node"
    should look like:
    Image
  • type "git" or "node" or any ot the supported commands listed in suggestions.tx NerdFontIcons
  • result, no glyphs:
Image Image

Expected behavior
Glyphs should be shown (for top-level commands)

Environment

  • OS: Win 11
  • Output of is --version: 0.0.2
  • Nodejs Version: 26.5.1
  • Shell: pwsh, cmd
  • Shell Version: 7.6.4

Additional context
I did a quick lookup and found that runtime.ts runCommand() resolves hard coded icons for aliases and specs. This may or may not explain the issue.
Thus, I suppose suggestions.ts getIcon() may not be called on the top-level, so the main purpose of the glyphs is basically never achieved?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions