From 378f02059c26fc0e7ed7f8e9052045090065515d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rn-Michael=20Miehe?= Date: Tue, 6 Aug 2024 21:49:51 +0200 Subject: [PATCH] more convenience settings for vscode --- .../devcontainer.json => .devcontainer.json | 12 +++++++++++- .vscode/settings.json | 14 ++++++++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) rename .devcontainer/devcontainer.json => .devcontainer.json (86%) diff --git a/.devcontainer/devcontainer.json b/.devcontainer.json similarity index 86% rename from .devcontainer/devcontainer.json rename to .devcontainer.json index 3f9215f..6fe2f5d 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer.json @@ -8,12 +8,22 @@ // Features to add to the dev container. More info: https://containers.dev/features. "features": { - "ghcr.io/devcontainers-contrib/features/poetry:2": {} + "ghcr.io/devcontainers-contrib/features/poetry:2": {}, + "ghcr.io/devcontainers/features/git-lfs:1": {} // "ghcr.io/devcontainers-contrib/features/apt-get-packages:1": { // "packages": "git-flow" // } }, + "mounts": [ + { + // make home directory persistent + "source": "devcontainer-home-vscode-${devcontainerId}", + "target": "/home/vscode", + "type": "volume" + } + ], + // "containerEnv": { // "TZ": "Europe/Berlin" // }, diff --git a/.vscode/settings.json b/.vscode/settings.json index 206ba6d..8303355 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,20 +1,30 @@ { "python.languageServer": "Pylance", "[python]": { + "diffEditor.ignoreTrimWhitespace": false, "editor.formatOnSave": true, + "editor.wordBasedSuggestions": "off", "editor.defaultFormatter": "ms-python.black-formatter", "editor.codeActionsOnSave": { - "source.organizeImports": "explicit" + "source.organizeImports": "explicit", + "source.fixAll": "explicit", }, }, "git.closeDiffOnOperation": true, + "python.analysis.autoImportCompletions": true, + "python.analysis.importFormat": "relative", + "python.analysis.fixAll": [ + "source.convertImportFormat", + "source.unusedImports", + ], "python.analysis.typeCheckingMode": "basic", "python.analysis.diagnosticMode": "workspace", "python.testing.unittestEnabled": false, "python.testing.pytestEnabled": true, "python.testing.pytestArgs": [ - "--import-mode=importlib" + "--import-mode=importlib", ], // "black-formatter.importStrategy": "fromEnvironment", // "flake8.importStrategy": "fromEnvironment", + // "isort.importStrategy": "fromEnvironment", } \ No newline at end of file