In VSCode, open the command palette with: Command + Shift + P
Then type: shell command
and choose install 'code' command in PATH
Create a virtual environment for your project: python -mvenv venv
.
Then: pip install jupyter graphviz black
and anything else you need.
Then open code with the virtualenv enabled and vscode will use your venv for everything, including code formatting tools
Two main extensions, both from Microsoft:
- Python
- Black Formatter
Black will assume you have the black
python module installed into your environment, so always do the virtualenv part first.
{
/* App */
"workbench.iconTheme": null,
"workbench.tree.indent": 17,
"workbench.startupEditor": "newUntitledFile",
"workbench.editor.enablePreview": false,
"workbench.editor.enablePreviewFromQuickOpen": false,
"keyboard.dispatch": "keyCode",
"window.openFoldersInNewWindow": "on",
"window.menuBarVisibility": "toggle",
/* Editor */
"editor.fontSize": 15,
"editor.lineHeight": 17,
"editor.letterSpacing": -0.2,
"editor.renderLineHighlight": "gutter",
"editor.guides.indentation": false,
"editor.bracketPairColorization.enabled": false,
"editor.folding": false,
"editor.detectIndentation": false,
"editor.minimap.enabled": false,
"breadcrumbs.enabled": false,
"editor.parameterHints.enabled": false,
"editor.renderControlCharacters": false,
"editor.autoClosingBrackets": "never",
"editor.autoClosingQuotes": "never",
"editor.quickSuggestionsDelay": 300,
"editor.quickSuggestions": {
"other": false,
"comments": false,
"strings": false
},
/* Terminal */
"terminal.integrated.fontSize": 15,
"terminal.integrated.fontWeightBold": "normal",
"terminal.integrated.drawBoldTextInBrightColors": false,
"terminal.integrated.allowChords": false,
"terminal.integrated.scrollback": 10000,
"terminal.integrated.shellIntegration.enabled": false,
"terminal.integrated.shellIntegration.history": 0,
"terminal.integrated.enableImages": true,
"terminal.integrated.enableMultiLinePasteWarning": false,
/* Files */
"files.saveConflictResolution": "overwriteFileOnDisk",
"files.insertFinalNewline": true,
"explorer.excludeGitIgnore": true,
"files.exclude": {
"build": true,
"**/*.swp": true,
"**/.vscode": true,
"**/.git": true,
"**/.svn": true,
"**/.hg": true
},
/* Leave me alone */
"security.workspace.trust.banner": "never",
"security.workspace.trust.enabled": false,
"update.showReleaseNotes": false,
"extensions.ignoreRecommendations": true,
"telemetry.telemetryLevel": "off",
"typescript.surveys.enabled": false,
/* Debug */
"debug.openDebug": "neverOpen",
"debug.internalConsoleOptions": "openOnSessionStart",
/* Git */
"git.enabled": false,
"git.decorations.enabled": false,
/* Python */
"python.defaultInterpreterPath": "",
"python.venvFolders": [
"venv"
],
"jupyter.experiments.enabled": false,
/* HTML */
"html.suggest.html5": false,
"html.autoClosingTags": false,
"html.autoCreateQuotes": false,
"[html]": {
"editor.tabSize": 2
},
/* JS */
"[javascript]": {
"editor.tabSize": 2
},
/* JSON */
"[json]": {
"editor.tabSize": 2
},
/* Markdown */
"markdown.preview.scrollEditorWithPreview": false,
"markdown.preview.fontSize": 17,
}