vscode-favorites
vscode-favorites copied to clipboard
Global Favorites
Is your feature request related to a problem? Please describe. I'd like to store "global" favorites that aren't related to a single workspace, so that when I switch between workspaces the favorites remain the same. Unfortunately, I think the favorites.json file location MUST be relative to a workspace root.
Describe the solution you'd like A way to store a favorites.json file globally, such as in the extension's own data directory. Maybe allow for environment variable expansion, like is done at https://github.com/oleg-shilo/Favorites.vscode ?
This would be a great addition to this Extension. Do you have it in mind for next releases @kdcro101 ?
Just change one line code to add global favorites if you don't care workspace favorites. I did and it works well for me.
File: src/class/storage.ts
Change this line
this.storageFilePath = path.join(workspace.getConfigurationRoot(), execRelativePath);
to
this.storageFilePath = path.isAbsolute(execRelativePath) ? execRelativePath : path.join(workspace.getConfigurationRoot(), execRelativePath);
And config your Storage File Path
value as a absolute path in your vscode extension setting.