Skip to content

Activate extension if other extension is activated #595

Discussion options

You must be logged in to vote

Hi @itavero ,

There is not such event, as you can see here https://code.visualstudio.com/api/references/activation-events.

You can say your extension depends on another extension, using the extensionDependencies entry in package.json (more details here https://code.visualstudio.com/api/references/extension-manifest), but this entry is for installation purposes, not activation.

Right now, the only way is to check if the ms-vscode.cmake-tools is active prior to run your commands/handle activation, using the the Extensions API (https://code.visualstudio.com/api/references/vscode-api#extensions). Something like:

    let msext = vscode.extensions.getExtension("ms-vscode.cmake-tools");
    if (!m…

Replies: 4 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@itavero
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by isidorn
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
5 participants