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

Closed
wants to merge 1 commit into from
Closed

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.

@gperdomor
Copy link

gperdomor commented Jan 23, 2025

@adamwathan @QuarticCat I did a similar change in this PR #1131 ... In my PR the idea is activate the extension only when tailwind files are present inside the workspace

@thecrypticace
Copy link
Contributor

See my comment here about why a change like this is incorrect: #1131 (comment)

Gonna close this one but thanks anyway

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.

4 participants