Skip to content

Commit

Permalink
Add symbols.defaultAssociations option to allow users to exclude defa…
Browse files Browse the repository at this point in the history
…ult associations
  • Loading branch information
Remceau committed Dec 8, 2024
1 parent 502aa7a commit 7b4d4fa
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@
"default": false,
"description": "Hide arrow icons in the explorer section."
},
"symbols.defaultAssociations": {
"type": "boolean",
"default": true,
"description": "Include a set of predefined file and folder associations."
},
"symbols.folders.associations": {
"type": "object",
"default": {},
Expand Down
9 changes: 9 additions & 0 deletions src/lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,15 @@ function themeJSONToConfig(themeDef) {
function updateConfig(config) {
const themeJSON = getSoureFile();

const useDefaultAssociations = vscode.workspace.getConfiguration("symbols").get("defaultAssociations", true);
log.info(`🤖 symbols.defaultAssociations changed, updating to ${useDefaultAssociations}`);
if (useDefaultAssociations === false) {
themeJSON.fileExtensions = {};
themeJSON.fileNames = {};
themeJSON.languageIds = {};
themeJSON.folderNames = {};
}

for (const key in config) {
log.info(`🤖 symbols.${key} changed, updating to ${config[key]}`);
const updateHandler = updateThemeJSONHandlers[key];
Expand Down

0 comments on commit 7b4d4fa

Please sign in to comment.