-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Fix file icon mapping #33855
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
Merged
Merged
Fix file icon mapping #33855
+809
−108
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How do we update |
Manually, it doesn't need to update too much. |
How to do it manually? What are the instructions? |
Just follow the file's syntax. If you'd like to keep the original script, here it is: <?php
$path = '/Applications/Visual Studio Code.app/Contents/Resources/app/extensions';
$dirs = glob("$path/*", GLOB_ONLYDIR);
$res = [];
foreach ($dirs as $dir) {
$json = json_decode(file_get_contents("$dir/package.json"), true);
$key = "pkg:" . basename($dir);
foreach ($json['contributes']['languages'] ?? [] as $lang) {
foreach ($lang['extensions'] ?? [] as $ext) {
$res[$key][$lang['id']][] = $ext;
}
}
}
echo json_encode($res, JSON_PRETTY_PRINT); |
yardenshoham
approved these changes
Mar 11, 2025
hiifong
approved these changes
Mar 11, 2025
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Mar 12, 2025
* giteaofficial/main: Fix various Fomantic UI and htmx problems (go-gitea#33851) Add workflow_job webhook (go-gitea#33694) Fix file icon mapping (go-gitea#33855) Drop fomantic build (go-gitea#33845) Fix auto concurrency cancellation skips commit status updates (go-gitea#33764) Fix test code (go-gitea#33829) Remove "noscript" tag from html head (go-gitea#33846) Fix material icon & diff highlight (go-gitea#33844) Fix LFS URL (go-gitea#33840) Add material icons for file list (go-gitea#33837)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
modifies/go
Pull requests that update Go code
skip-changelog
This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use the file extension mapping from VSCode's extensions. Otherwise js/ts/vba/... files won't get correct icons.