Skip to content

Commit

Permalink
Add VS Code integration
Browse files Browse the repository at this point in the history
  • Loading branch information
flying-sheep committed Sep 5, 2024
1 parent 89da795 commit fa3149f
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 4 deletions.
4 changes: 0 additions & 4 deletions {{cookiecutter.project_name}}/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,3 @@ __pycache__/
# docs
/docs/generated/
/docs/_build/

# IDEs
/.idea/
/.vscode/
18 changes: 18 additions & 0 deletions {{cookiecutter.project_name}}/.vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"recommendations": [
// GitHub integration
"github.vscode-github-actions",
"github.vscode-pull-request-github",
// Language support
"ms-python.python",
"ms-python.vscode-pylance",
"ms-toolsai.jupyter",
"tamasfe.even-better-toml",
// Dependency management
"ninoseki.vscode-mogami",
// Linting and formatting
"editorconfig.editorconfig",
"charliermarsh.ruff",
"esbenp.prettier-vscode",
],
}
33 changes: 33 additions & 0 deletions {{cookiecutter.project_name}}/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Python: Build Documentation",
"type": "debugpy",
"request": "launch",
"module": "sphinx",
"args": ["-M", "html", ".", "_build"],
"cwd": "${workspaceFolder}/docs",
"console": "internalConsole",
"justMyCode": false,
},
{
"name": "Python: Debug Test",
"type": "debugpy",
"request": "launch",
"program": "${file}",
"purpose": ["debug-test"],
"console": "internalConsole",
"justMyCode": false,
"env": {
"PYTEST_ADDOPTS": "--color=yes",
},
"presentation": {
"hidden": true,
}
},
]
}
20 changes: 20 additions & 0 deletions {{cookiecutter.project_name}}/.vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"[python][jsonc][yaml]": {
"editor.formatOnSave": true,
},
"[python]": {
"editor.defaultFormatter": "charliermarsh.ruff",
"editor.codeActionsOnSave": {
"source.fixAll": "always",
"source.organizeImports": "always",
},
},
"[jsonc][yaml]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
},
"python.analysis.typeCheckingMode": "basic",
"python.testing.pytestEnabled": true,
"python.testing.pytestArgs": ["-vv", "--color=yes"],
}


0 comments on commit fa3149f

Please sign in to comment.