Skip to content

Activate extension on typescript.native-preview.enable#3333

Closed
jakebailey wants to merge 1 commit intomainfrom
jabaile/onCommand-extension
Closed

Activate extension on typescript.native-preview.enable#3333
jakebailey wants to merge 1 commit intomainfrom
jabaile/onCommand-extension

Conversation

@jakebailey
Copy link
Copy Markdown
Member

I think this fixes #3312.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the VS Code extension manifest so the extension can activate when the user runs the “Enable TypeScript Native Preview” command, preventing “command not found” errors when no TypeScript/JavaScript file is open (fixing the activation gap reported in #3312).

Changes:

  • Add onCommand:typescript.native-preview.enable to the extension activationEvents so the typescript.native-preview.enable command can trigger activation.

Copy link
Copy Markdown
Member

@andrewbranch andrewbranch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm, can't hurt?

"onLanguage:typescript",
"onLanguage:typescriptreact"
"onLanguage:typescriptreact",
"onCommand:typescript.native-preview.enable"
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since you contribute the command, your extension should already be activated automatically. However there is an enablement field for that command. Could that be false for the user?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, since the enablement depends on something we explicitly set on activate ☹️

@jakebailey jakebailey closed this Apr 6, 2026
@jakebailey jakebailey deleted the jabaile/onCommand-extension branch April 6, 2026 20:35
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.

latest release [0.20260401.1] breaks LSP on VS code

6 participants