diff --git a/.devcontainer/0/Dockerfile b/.devcontainer/0/Dockerfile index 6158289f3a..e20cca0cbf 100644 --- a/.devcontainer/0/Dockerfile +++ b/.devcontainer/0/Dockerfile @@ -22,7 +22,7 @@ RUN eval "$(conda shell.bash hook)" \ && conda install -y \ python=$PYTHON_VERSION \ conda-forge::nodejs=$NODEJS_VERSION \ - && pip install pre-commit black isort + && pip install pre-commit # Finalize conda setup RUN conda init \ diff --git a/.devcontainer/0/devcontainer.json b/.devcontainer/0/devcontainer.json index 0d9cce0f18..074f45528a 100644 --- a/.devcontainer/0/devcontainer.json +++ b/.devcontainer/0/devcontainer.json @@ -21,9 +21,6 @@ "vscode": { "extensions": [ "nekosu.maa-support", - "ms-python.python", - "ms-python.black-formatter", - "ms-python.isort", "esbenp.prettier-vscode", "DavidAnson.vscode-markdownlint", "yzhang.markdown-all-in-one", @@ -31,26 +28,13 @@ "mkxml.vscode-filesize" ], "settings": { + // Color theme + "workbench.colorTheme": "Default Dark Modern", + // Editor formatting "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", - // Language-specific formatting - "[python]": { - "editor.defaultFormatter": "ms-python.black-formatter", - "editor.codeActionsOnSave": { - "source.organizeImports": "explicit" - } - }, - - // Python formatting and linting - "isort.args": ["--profile", "black"], - - // Python runtime - "python.terminal.launchArgs": ["-u"], - "python.defaultInterpreterPath": "/home/vscode/miniconda/envs/maa/bin/python", - "python.terminal.activateEnvironment": false, - // Performance optimizations "search.exclude": { "**/node_modules": true, diff --git a/.devcontainer/1/devcontainer.json b/.devcontainer/1/devcontainer.json index 4e205dc160..d641b320a3 100644 --- a/.devcontainer/1/devcontainer.json +++ b/.devcontainer/1/devcontainer.json @@ -34,6 +34,9 @@ "mkxml.vscode-filesize" ], "settings": { + // Color theme + "workbench.colorTheme": "Default Dark Modern", + // Editor formatting "editor.formatOnSave": true, "editor.defaultFormatter": "esbenp.prettier-vscode", diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index b5c5908b5a..ef62bd322c 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,5 +1,13 @@ { "name": "Plain Env (Nothing Installed)", "image": "mcr.microsoft.com/devcontainers/base:ubuntu", - "postCreateCommand": "git config --global --add safe.directory \"$(pwd)\" && git submodule foreach --recursive 'git config --global --add safe.directory \"$toplevel/$path\"'" + "postCreateCommand": "bash .devcontainer/post-create.sh", + "customizations": { + "vscode": { + "settings": { + // Color theme + "workbench.colorTheme": "Default Dark Modern" + } + } + } } diff --git a/.devcontainer/post-create.sh b/.devcontainer/post-create.sh new file mode 100644 index 0000000000..138753e749 --- /dev/null +++ b/.devcontainer/post-create.sh @@ -0,0 +1,8 @@ +#!/bin/bash +WORKSPACE=$(pwd) + +echo "====================" +cd "$WORKSPACE" +echo "Setting up git safe.directory for $WORKSPACE and its submodules..." +git config --global --add safe.directory "$WORKSPACE" +git submodule foreach --recursive 'git config --global --add safe.directory "$toplevel/$path"'