Merge pull request #7361 from microsoft/chrmarti/hard-nightingale

Add section about opting out of extensions
This commit is contained in:
Nick Trogh 2024-06-12 22:12:11 +02:00 коммит произвёл GitHub
Родитель 2182856ad0 c6c4bdb317
Коммит 14bb112cb0
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
1 изменённых файлов: 17 добавлений и 0 удалений

Просмотреть файл

@ -427,6 +427,23 @@ While you can edit your [devcontainer.json](/docs/devcontainers/create-dev-conta
![Add to devcontainer.json menu](images/containers/containers-addto-devcontainer.png)
### Opt out of extensions
If a base image or Feature configures an extension that you do not want installed in your dev container, you can opt out by listing the extension with a minus sign. For example:
```json
{
"image": "mcr.microsoft.com/devcontainers/typescript-node:1-20-bookworm",
"customizations": {
"vscode": {
"extensions": [
"-dbaeumer.vscode-eslint"
]
}
}
}
```
### "Always installed" extensions
If there are extensions that you would like always installed in any container, you can update the `dev.containers.defaultExtensions` User [setting](/docs/getstarted/settings.md). For example, if you wanted to install the [GitLens](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens) and [Resource Monitor](https://marketplace.visualstudio.com/items?itemName=mutantdino.resourcemonitor) extensions, you would specify their extension IDs as follows: