-
Notifications
You must be signed in to change notification settings - Fork 92
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
Change activation event to workspaceContainers
#388
Comments
@SethFalco Thanks for the ticket! Definitely would be better to turf the on startup instantiation of this extension (this was the only option when I initially developed it, I think...). I like both ideas, but I think it is reasonable to only load the extension if an applicable file is found. I do wonder about how we might consider other file types not defined in the default list. https://github.com/ryanluker/vscode-coverage-gutters/blob/master/package.json#L129-L135 |
Unfortunately, I don't think VSC has a way to change activation based on settings, so if you're expecting users to specify additional files that are not Some other extensions have a similar issue, for example SonarSource/sonarlint-vscode, prettier/prettier-vscode, and microsoft/vscode-eslint could just specify to only activate on the list of officially supported languages, but users can also have plugins/projects/settings that define or target other languages, so even if it's not too often, they need to use Fine with using |
@SethFalco Agreed that |
@SethFalco Thanks again for the contribution and the PR, the change should go out in 2.11.0 |
Describe the bug
Currently, the extension is set to activate on startup.
I'm looking through the activation events of all my extensions since lately, I've noticed some of them activate eagerly even when they don't apply to my workspace, which makes the startup slower and uses more resources on my system. This adds up when you have many extensions, i.e. I have 92.
VSC provides an activation event for when a certain file pattern is matched in the workspace:
https://code.visualstudio.com/api/references/activation-events#workspaceContains
Do you think it would be feasible to move the activation event for this extension from
*
toworkspaceContains
?For example:
Desktop (please complete the following information):
Additional context
Note, if
workspaceContains
might not be appropriate, we could still consider moving it from*
toonStartupFinished
.For example:
The text was updated successfully, but these errors were encountered: