Skip to content
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

Delay activation #1055

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Delay activation #1055

wants to merge 1 commit into from

Conversation

QuarticCat
Copy link

@QuarticCat QuarticCat commented Sep 21, 2024

This PR changes activationEvents from onStartupFinished to onLanguage:tailwindcss, which will be generated automatically since VSCode 1.74, so omitted.

Reference: https://code.visualstudio.com/api/references/activation-events#onLanguage

@adamwathan
Copy link
Member

Hey! Do you mind explaining the goal of this change? I don't know this codebase that well myself but I wonder if this presents an issue for people who aren't actually using the tailwindcss language mode at all, since this extension still needs to fire up to provide autocomplete in your HTML/Vue/JSX/whatever files.

@QuarticCat
Copy link
Author

The intention here is to activate this extension by need. For example, when I work on a backend project, I don't want to start it. onStartupFinished is just too aggressive.

This extension still needs to fire up to provide autocomplete in your HTML/Vue/JSX/whatever files.

It's OK. We just need to provide onLanguage:... for these languages in activationEvents. Here's an example from Vue's extension: https://github.com/vuejs/language-tools/blob/master/extensions/vscode/package.json#L24-L28

Feel free to close this PR since you know which languages to support better than me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants