Skip to content

seti-theme: ignore some extensions from theme #244872

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

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions extensions/theme-seti/build/update-icon-theme.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,12 @@ const inheritIconFromLanguage = {
"blade": 'php'
};

const ignoreExtAssociation = {
"properties": true
const ignoreExtAssociationFromVSCode = {
"properties": true,
};

const ignoreExtAssociationFromTheme = {
"sss": true,
};

const FROM_DISK = true; // set to true to take content from a repo checked out next to the vscode repo
Expand Down Expand Up @@ -369,7 +373,10 @@ exports.update = function () {
continue; // no need to assign default color.
}
if (pattern[0] === '.') {
ext2Def[pattern.substr(1).toLowerCase()] = def;
const ext = pattern.substring(1).toLowerCase();
if (!ignoreExtAssociationFromTheme[ext]) {
ext2Def[ext] = def;
}
} else {
fileName2Def[pattern.toLowerCase()] = def;
}
Expand Down Expand Up @@ -404,7 +411,7 @@ exports.update = function () {
if (!nonBuiltInLanguages[lang] && !inheritIconFromLanguage[lang]) {
for (let i2 = 0; i2 < exts.length; i2++) {
// remove the extension association, unless it is different from the preferred
if (ext2Def[exts[i2]] === preferredDef || ignoreExtAssociation[exts[i2]]) {
if (ext2Def[exts[i2]] === preferredDef || ignoreExtAssociationFromVSCode[exts[i2]]) {
delete ext2Def[exts[i2]];
}
}
Expand Down
Loading