Skip to content

Commit 7cc5a47

Browse files
committed
enhancement #30: automatically install extension for vscode
1 parent 941c9d0 commit 7cc5a47

File tree

3 files changed

+25
-0
lines changed

3 files changed

+25
-0
lines changed
File renamed without changes.

scripts/setup_vscode_extensions.sh

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#!/bin/bash
2+
3+
# List of VSCode extensions to install
4+
EXTENSIONS=(
5+
"ms-python.python"
6+
"ms-python.mypy-type-checker"
7+
"ms-python.black-formatter"
8+
"ms-python.flake8"
9+
"ms-python.isort"
10+
)
11+
12+
# Installing each extension
13+
for EXT in "${EXTENSIONS[@]}"; do
14+
code --install-extension "$EXT"
15+
done
16+
17+
# Uninstall Pylance if it is installed
18+
if code --list-extensions | grep -q 'ms-python.vscode-pylance'; then
19+
echo "Uninstalling Pylance..."
20+
code --uninstall-extension ms-python.vscode-pylance
21+
fi
22+
23+
echo "Extensions installation complete."

scripts/vscode/settings.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,6 @@
1010
"--profile",
1111
"black"
1212
],
13+
"mypy-type-checker.importStrategy": "fromEnvironment",
14+
"flake8.importStrategy": "fromEnvironment"
1315
}

0 commit comments

Comments
 (0)