question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Custom icons not working outside of .vscode/ folder

See original GitHub issue

After updating to VS Code v1.54, my custom icons definitions are now showing up as blank.

Following the directions in the README, I had included the following in my settings.json

"material-icon-theme.files.associations": {
    "*.pyx": "../../../icons/cython"
}

Where I had C:\Users\[username]\.vscode\icons\cython.svg, which worked prior to the update.

With some experimenting, I was able to find the icon would appear when placed within the .vscode/extensions/ folder. Shown below are some paths I found while experimenting.

"material-icon-theme.files.associations": {
    "*.pyx": "../../cython",        // WORKS: .vscode/extensions/cython.svg
    "*.pyx": "../../icons/cython",  // WORKS: .vscode/extensions/icons/cython.svg
    "*.pyx": "../cython",           // WORKS: .vscode/extensions/pkief.material-icon-theme-4.6.0/cython.svg
    "*.pyx": "cython",              // WORKS: .vscode/extensions/pkief.material-icon-theme-4.6.0/icons/cython.svg

    "*.pyx": "../../../cython",       // DOESN'T WORK: .vscode/cython.svg
    "*.pyx": "../../../icons/cython"  // DOESN'T WORK: .vscode/icons/cython.svg
}

I also found out that specifying absolute paths, even to files in the vscode/extensions/ directory do not work. Such as

"material-icon-theme.files.associations": {
    "*.pyx": "C:/Users/[username]/.vscode/extensions/cython"
}

I feel like there’s a piece of the puzzle I’m missing, but I have no clue what it is. Apologies if I’m doing something really dumb.

Build Info

vscode-material-icon-theme: v4.6.0

VS Code: Version: 1.54.3 (user setup) Commit: 2b9aebd5354a3629c3aba0a5f5df49f43d6689f8 Date: 2021-03-15T10:55:45.459Z Electron: 11.3.0 Chrome: 87.0.4280.141 Node.js: 12.18.3 V8: 8.7.220.31-electron.0 OS: Windows_NT x64 10.0.19042

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
PKiefcommented, Apr 27, 2021

I’m not sure, it can be that vscode protected it’s extension API to access folders outside the extensions directory, which is good in my opinion. I agree with you that it was more convenient to have the custom icons folder directly under the .vscode folder. But yeah, if it’s still working under the extensions directory and is more secure, then it’s also fine I think.

1reaction
Antyoscommented, Apr 25, 2021

@PKief Thanks! Unfortunately, I can’t seem get ../../icons/ to work as shown in the updated README. The only time I can get the config ../../icons/sample to work is with the following directory structure:

.vscode
 ┗ extensions
   ┗ icons
     ┗ sample.svg

Can anyone else confirm this?

Read more comments on GitHub >

github_iconTop Results From Across the Web

File and Folder Icons in VS Code!
Initially we were going to ship with a single, simple theme called Minimal, which has folder open/closed icons as well as a single...
Read more >
VS code icons disappeared - Stack Overflow
Open VS Code, go to File > Preferences > File icon theme > [Theme name] and choose your icon theme. Share.
Read more >
Change file icon while vscode is installed? - Super User
The article File and Folder Icons in VS Code! lists the icon themes in VScode. The File Icon Theme can be changed from...
Read more >
Advanced Visual Studio Code for Python Developers
If you're just getting started with VS Code, you might want to check out Jon Fincher's tutorial ... The Material Theme looks best...
Read more >
A deep dive on themes, fonts, and more! - YouTube
An in-depth look at customizing the appearance of VS Code, with a focus on themes and fonts.First we'll cover basic customization including ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found