HTML-CSS-Class-Completion icon indicating copy to clipboard operation
HTML-CSS-Class-Completion copied to clipboard

Use activiation events to prevent running the extension on unexpected workspaces

Open jens1o opened this issue 8 years ago • 0 comments

Instead of listening to everything https://github.com/zignd/HTML-CSS-Class-Completion/blob/749536f81de5f6ec0ba54c7d3e769d91d21f424c/package.json#L21-L23

we could use something like:

 "activationEvents": [
    "onLanguage:css",
    "workspaceContains:**/*.css"
],

which will only start the extension when there are css files on the entire workspace(including subfolders) or a css file is going to be created.

This will save memory and unneeded cpu usage.

(extracted from https://github.com/zignd/HTML-CSS-Class-Completion/issues/114#issuecomment-364691510)

jens1o avatar Feb 11 '18 07:02 jens1o