leftstick / vscode-favorites

An extension helps developer marking resources as favorite. Therefor, those resources can be easily found at a special view
https://leftstick.gitbooks.io/vscode-favorites/
GNU General Public License v3.0
49 stars 22 forks source link

Show the explorer view only when there are some favorites #14

Open fabiospampinato opened 6 years ago

fabiospampinato commented 6 years ago

I don't like when my explorer pane gets cluttered with all sorts of views, I think this extension should only show its view if there are some actual favorites.

I jump around many different projects and I don't want the "favorites" view displayed everywhere, only when needed.

In order to add support for this you'll need to add something like this where you define the explorer view:

"when": "config.favorites.viewEnabled == true"

Perhaps instead it could be written like this, assuming favorites.resources will be false by default, I'm not 100% sure about what the accepted syntax for those when clauses actually is:

"when": "config.favorites.resources != false"

This is the single biggest issue preventing me from using this extension at the moment.

leftstick commented 6 years ago

@fabiospampinato sorry to hear that, but since last time i checked, condition check like you required (i want to implement in that way as well), is not supported, see when-clause-contexts, may vscode team has some performance/security concern about that

fabiospampinato commented 5 years ago

@leftstick doesn't matter if you can't access the config directly, you can set arbitrary context keys https://github.com/Microsoft/vscode/issues/10471