Skip to content
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

Icon for .fileextension #583

Open
CavalcanteLeo opened this issue Mar 24, 2023 · 2 comments
Open

Icon for .fileextension #583

CavalcanteLeo opened this issue Mar 24, 2023 · 2 comments

Comments

@CavalcanteLeo
Copy link

CavalcanteLeo commented Mar 24, 2023

Is it possible to add icons to these files?

  • .editorconfig
  • .env
  • .eslintignore
  • .eslintrc
  • .gitignore
  • .npmrc
  • .prettierrc
  • *.test.ts

Screenshot 2023-03-23 at 23 12 04

I've tried this way, but didn't work:

Screenshot 2023-03-23 at 23 13 30

@ayushpoddar
Copy link
Contributor

The section on Custom configurations is incomplete in this regard.

The file files.yaml only holds the mapping between the type of file (not necessarily the file extension) and the corresponding icon to be used. For example it is quite common to interchangeably use yml and yaml as the extension for YAML files. files.yaml only holds the mapping for yml.

So, what does the program do when the file extension is yaml?

The program first refers the file file_aliases.yaml. It lies in the same directory as files.yaml. It basically maps various file extensions to types of files. I suggest you check the file in the link provided. You should be able to understand easily what I mean.

So, before defining the icon mapping in files.yaml, you should probably update file_aliases.yaml first. This is the code that determines the file type from the extension of the file, and this line loads the corresponding icon.

@avdv
Copy link
Collaborator

avdv commented Apr 30, 2023

This is a duplicate of #469 which has a PR in #577.

\edit: except for the last pattern: *.test.ts -- this is a new feature, we basically would have to implement glob matching (like ls does for colors) or suffix matching at least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants