Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to install and enable workspace extensions in vscode with the .vscode folder?

What I want to achieve:

  1. I want my projects to be self-contained in a manner that will allow collaborators to start working on them with all the proper linting and language features etc.. (I know this is a bit harsh in the sense that i am "forcing" an IDE in it, but for the sake of the problem it is helpful.)

  2. I want my projects to be self-contained so that i have full config control over which extensions work and which don't when i approach working on them. I don't want to be depenedant on my own machine with my own vscode user config. I don't want to be dependent on extension I have installed in the past. And i also don't want different extension to be mixed up. I want everything disabled on the global user space and only enabled in controlled manned via some in project setting file.

What I think I basically need:

A VSCode extension manager that can work locally in the dir. Sort of like an npm for vscode.

So i would be able to structure extension "dependencies" and run an install and locally enable the extension to work on the specific workspace.

extension.package

{
  "extensions": {
    "eslint": "6.4^"
    "babel": "15.2^"
  }
}

Then there would be the regular configuration files for these extension available already with the git - and if not perhaps they can be auto-generated with some default settings.

and all the developer would need to do is run some bash code command.


Does something like this exist? Is such a functionality available to achieve?

like image 348
aviya.developer Avatar asked Dec 30 '19 10:12

aviya.developer


1 Answers

The only thing that I have found so far that is at least a bit of help is to have recommended extensions for a workspace :S https://code.visualstudio.com/docs/editor/extension-gallery#_workspace-recommended-extensions

You can create a recommended list of extensions for a workspace with the Extensions: Configure Recommended Extensions (Workspace) command. [...]

An example extensions.json could be:

   {
     "recommendations": [
       "ms-vscode.vscode-typescript-tslint-plugin",
       "dbaeumer.vscode-eslint",
       "msjsdiag.debugger-for-chrome"
     ]
   }
like image 120
CitrusO2 Avatar answered Sep 21 '22 12:09

CitrusO2