VSCode workplace recommended extensions

| 1 minute | Comments

You can recommend the required VSCode extensions per repository to your fellow programmers. This is what VSCode calls “workspace recommended extensions”.

For example, if your project is a Scala project, maybe you want to recommend the extension for syntax highlighting, Metals, and others.

Add .vscode/extensions.json to your repository:

// .vscode/extensions.json
{
  // See http://go.microsoft.com/fwlink/?LinkId=827846
  // for the documentation about the extensions.json format
  "recommendations": [
    // Scala IDE: https://scalameta.org/metals/
    "scalameta.metals",

    // This package is already included by Metals (above), but if people
    // don't like Metals, then at least recommend syntax highlighting
    "scala-lang.scala",

    // Scaladex search for software dependencies
    "baccata.scaladex-search",
  ]
}

On opening the workspace, VSCode will recognize the file and ask if you want to install the recommended extensions:

VSCode asking you if you want to install the recommended extensions.
| Written by
Tags: Scala | Snippet