yatki / vscode-surround

🔥 A simple yet powerful extension to add wrapper templates around your code blocks
https://marketplace.visualstudio.com/items?itemName=yatki.vscode-surround
MIT License
930 stars 39 forks source link

Consider switching to another activation event policy #87

Open femto-code opened 1 year ago

femto-code commented 1 year ago

First, thanks for this extension! Just a minor thing: I noticed this extension will be activated whenever VSC starts up.

As the API reference states:

To ensure a great user experience, please use this activation event in your extension only when no other activation events combination works in your use-case.

There are some other similar extensions that use a more specific activation event to activate only when needed (e.g. when a surround command is triggered).

yatki commented 1 year ago

Hey @femto-code. Thank you very much for the feedback. Yes, you are totally right and I'm aware of that. When I released the extension, activation events were causing the extension to start with a slight lag. I wanted to avoid that back then.

I totally agree that it's the best practice but since the activation function is only triggered once, and the extension is very lightweight I don't think it's a very big problem at the moment.

I'll look into this and if it's fine, I'll change that.

Cheers,