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

Use glob pattern for file / folder associations #330

Open
JonJamesDesign opened this issue Oct 9, 2018 · 17 comments
Open

Use glob pattern for file / folder associations #330

JonJamesDesign opened this issue Oct 9, 2018 · 17 comments
Labels
missing API support This issue cannot be implemented due to missing features of VS Code.

Comments

@JonJamesDesign
Copy link

This icon set is awesome; thanks for all the hard work so far, it's fantastic.

Further to the great work you've already done, it would be cool if I could set all files within a folder to use a certain icon; e.g:

"material-icon-theme.files.associations": {
  "**/reducers/*.js": "redux-reducer"
},

Keep up the good work.

@PKief
Copy link
Member

PKief commented Oct 9, 2018

Hi @JonJamesDesign, thank you for your kind feedback. I really like your idea, but the extensions API of VS Code doesn't support glob patterns for file icon associations at the moment. There's already an open issue in the official VS Code repository. Feel free to support it with a 👍

@tyron
Copy link

tyron commented Mar 13, 2020

Is this still blocked? On the VS Code "files.associations" we can already specify wildcard at the end (e.g. "Jenkinsfile-*": "groovy").
I wish we could do the same with "material-icon-themes".

"material-icon-themes": {
   "Jenkinsfile-*": "jenkins"
}

@PKief
Copy link
Member

PKief commented Mar 14, 2020

@tyron Yes, it's still blocked my missing API support.

@maurodesouza
Copy link

maurodesouza commented Sep 18, 2021

Hi!

@PKief Is this still blocked?

@PKief
Copy link
Member

PKief commented Sep 18, 2021

Yes, unfortunately it's still blocked. The issue in the repository of VS Code is still open. Hopefully, it will be implemented someday. I'll keep you informed :)

@maurodesouza
Copy link

@PKief ok, thanks!

@pgbradbury
Copy link

pgbradbury commented Apr 6, 2022

@PKief Looks like this will not be supported by vscode - microsoft/vscode#12493 (comment)

@zm-cttae
Copy link

zm-cttae commented Jan 13, 2023

Thanks for posting the issue!
This is possible for dot segments of the filename in linear time without breaking the current implementation.
I've put in a comment over there with a code sample.

@zm-cttae
Copy link

zm-cttae commented Jan 14, 2023

reducers/*.js can be supported already! (microsoft/vscode#136656)

To get it working, we need to put in new logic when we parse material-icon-theme.file.associations.
The config key needs the <FOLDER>/ removed before processing the setting key & value..
then it should be added back to the key when appending that setting to the generated JSON.

@zm-cttae
Copy link

zm-cttae commented Mar 4, 2023

I implemented filename globs in VS Code as a PR and they will assess soon™ - microsoft/vscode#174286

@PKief
Copy link
Member

PKief commented Mar 5, 2023

@zm-cttae thanks, that looks awesome :) Hopefully the VS Code team will take a look at it and include it to the API. Would solve lots of issues here.

@PKief PKief changed the title Use glob pattern for file associations Use glob pattern for file / folder associations Mar 29, 2023
@sadfsdfdsa
Copy link

@zm-cttae sorry for bothering you, have any updates? And am I correctly got, that this issue will allow features like that #1985 ? For *_test.ts patterns or like that.

@zm-cttae
Copy link

The last work done is microsoft/vscode#177650
I believe Martin is busy with Webpack and theming work atm though

I am also busy setting up VSCE Toolroom migrations.. we might find time for it in the summer 🙂

@zm-cttae
Copy link

What I didn't realise is that Backlog =

"I am coming back to this 3 months later when my other large tickets get tested and land in production"

That gives me plenty of time to throw it together myself, I'll get on it soon :)

@starball5
Copy link

@MisterLight
Copy link

Any update on this issue?

@lucas-labs
Copy link
Member

Any update on this issue?

Sadly vscode still lacks support for glob/regex assignments (microsoft/vscode#174286)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
missing API support This issue cannot be implemented due to missing features of VS Code.
Projects
None yet
Development

No branches or pull requests

10 participants