mtxr / vscode-sqltools

Database management for VSCode
https://vscode-sqltools.mteixeira.dev?utm_source=github&utm_medium=homepage-link
MIT License
1.44k stars 291 forks source link

Settings in development container #1121

Open JanCBrammer opened 1 year ago

JanCBrammer commented 1 year ago

Does the VSCode extension consider settings provided via the devcontainer specification?

Instead of providing the settings via .vscode/settings.json I'm specifying them in .devcontainer/devcontainer.json according to https://containers.dev/supporting#visual-studio-code:

{
  "customizations": {
    "vscode": {
      "extensions": [
        "mtxr.sqltools",
        "mtxr.sqltools-driver-pg",
      ],
      "settings": {
        "sqltools.connections": [
          {
            "previewLimit": 50,
            "server": "postgres",
            "port": 5432,
            "driver": "PostgreSQL",
            "name": "development",
            "database": "foo",
            "username": "postgres",
            "password": ""
          },
          {
            "previewLimit": 50,
            "server": "postgres",
            "port": 5432,
            "driver": "PostgreSQL",
            "name": "test",
            "database": "bar",
            "username": "postgres",
            "password": ""
          }
        ],
      }
    }
  }
}

The extension does not pick up these settings under .devcontainer/devcontainer.json, i.e., no connections appear in the VSCode UI. If I place the settings in .vscode/settings.json, the connections appear in the UI. I tried rebuilding the container without cache, which didn't help. Any hints are much appreciated.