// See https://aka.ms/vscode-remote/devcontainer.json for format details.
// "image": "ghcr.io/ludeeus/devcontainer/integration:latest",
{
    "build": {
        "dockerfile": "Dockerfile"
    },
    "name": "Versatile Thermostat integration",
    "appPort": ["8123:8123"],
    // "postCreateCommand": "container install",
    "postCreateCommand": "./container dev-setup",

    "mounts": [
        "source=${localEnv:HOME}/.ssh,target=/home/vscode/.ssh,type=bind,consistency=cached",
        // uncomment this to get the versatile-thermostat-ui-card
        "source=${localEnv:HOME}/SugarSync/Projets/home-assistant/versatile-thermostat-ui-card/dist,target=/workspaces/versatile_thermostat/config/www/community/versatile-thermostat-ui-card,type=bind,consistency=cached"
    ],

    "customizations": {
        "vscode": {
            "extensions": [
                "ms-python.python",
                "ms-python.pylint",
                // Doesn't work (crash). Default in python is to use Jedi see Settings / Python / Default Language
                // "ms-python.vscode-pylance",
                "ms-python.isort",
                "ms-python.black-formatter",
                "visualstudioexptteam.vscodeintellicode",
                "redhat.vscode-yaml",
                "github.vscode-pull-request-github",
                "ryanluker.vscode-coverage-gutters",
                "ferrierbenjamin.fold-unfold-all-icone",
                "LittleFoxTeam.vscode-python-test-adapter",
                "donjayamanne.githistory",
                "waderyan.gitblame",
                "keesschollaart.vscode-home-assistant",
                "vscode.markdown-math",
                "yzhang.markdown-all-in-one",
                "github.vscode-github-actions",
                "azuretools.vscode-docker",
                "huizhou.githd",
                "github.copilot",
                "github.copilot-chat"
            ],
            "settings": {
                "files.eol": "\n",
                "editor.tabSize": 4,
                "terminal.integrated.profiles.linux": {
                    "bash": {
                        "path": "bash",
                        "args": []
                    }
                },
                "terminal.integrated.defaultProfile.linux": "bash",
                // "terminal.integrated.shell.linux": "/bin/bash",
                "python.pythonPath": "/usr/bin/python3",
                "python.analysis.autoSearchPaths": true,
                "pylint.lintOnChange": false,
                "python.formatting.provider": "black",
                "python.formatting.blackArgs": ["--line-length", "180"],
                "python.formatting.blackPath": "/usr/local/py-utils/bin/black",
                "editor.formatOnPaste": false,
                "editor.formatOnSave": true,
                "editor.formatOnType": true,
                "files.trimTrailingWhitespace": true
                // "python.experiments.optOutFrom": ["pythonTestAdapter"],
                // "python.analysis.logLevel": "Trace"
            }
        }
    }
}
