vscode icon indicating copy to clipboard operation
vscode copied to clipboard

List of required extensions for project

Open outcoldman opened this issue 10 years ago • 10 comments

Proposal

Allow projects to specify list of recommended/required extensions.

Proposed solution

For example, vscode may have in the .vscode/settings.json

{
    "extensions.extendedConfigurations": {
         "chrome.debugger": {
             "required": True
         }
    }
}

When user will open this project - he will see a message if extension has not been installed

Current project recommend you to install chrome.debugger extension (tasks, debugger or syntax may depend on this extension). Do you want to install it?

outcoldman avatar Apr 20 '16 16:04 outcoldman

@outcoldman Actually there is an extension for this. We should consider promoting that.

jrieken avatar Apr 21 '16 06:04 jrieken

@jrieken for my usecase #6178 it would be crucial to have this as a core feature of vscode

skolmer avatar May 11 '16 22:05 skolmer

makes sense. it's something we like and don't hear the first time.

jrieken avatar May 12 '16 07:05 jrieken

+1, This was my inspiration for writing this extension. Unfortunately I have not been able to dedicate a lot of time towards this. I have been working up updating this code. What I am realizing is I need to duplicate a lot of vscode functionality when it comes to extension installation. I would be nice to have this as a core feature (let me know if I can help), or at least provide a way to hook into the extension services (gallery/manager/etc) through an API to allow this type of workflow

webstp avatar Aug 20 '16 00:08 webstp

I believe this feature was added in VSCode 1.6: https://code.visualstudio.com/updates/v1_6#_workspace-extension-recommendations

You can now create a .vscode/extensions.json file that defines which extensions should be installed for a project:

{
    "recommendations": [
        "eg2.tslint",
        "dbaeumer.vscode-eslint",
        "msjsdiag.debugger-for-chrome"
    ]
}

VSCode will prompt you to install these extensions if they are not already installed.

mjbvz avatar Nov 12 '16 00:11 mjbvz

It seems there is no way to automatically create a list of installed extensions, which can help me keep my dotfiles in sync? So I'll have to run --list-extensions and put that in my repo whenever I add a new extension?

jcrben avatar Apr 15 '17 11:04 jcrben

@mjbvz How does this behave when switching betwee. Two projects recommending different extensions? Will it properly disable "auto" installed extensions and enable them back if I come back ti the original project? What about a way to automatically update this file as denoted by @jcrben this is quite painful to handle manually.

Telokis avatar Apr 18 '17 13:04 Telokis

@Telokis All extensions are currently installed globally. You can then disable the extensions in individual workspaces but I do not believe this will be done automatically. #347 tracks support for workspace specific extensions

mjbvz avatar Apr 18 '17 18:04 mjbvz

@jcrben Can you explain your use case? I don't think you should have to be updating the extensions.json file that often.

code --list-extensions --show-versions is the way to list installed extensions. It should be easy enough to create a simple script that parses the output from this command and creates a extensions.json file if you need this functionality

mjbvz avatar Apr 18 '17 18:04 mjbvz

I don't want to have to run a command get a list of installed extensions. I want my installed extensions automatically synced into my dotfiles repository... anyhow it's not a big deal right now

jcrben avatar Apr 22 '17 19:04 jcrben