This profile is optimized for data science and data engineering work and activities. It is also somewhat opinionated so feel free to remove/replace extensions and settings to suit your needs. It's a free country! 😋
- ✅ Support for Python and notebook editing for both Jupyter and SQL 🧑💻
- ✅ Dedicated linting and formatting for Python as well as auto docstring generation 💅
- ✅ Powerful data exploration and cleaning with support for auto-generated Pandas code 👩🔬
- ✅ Supercharged coding productivity and search with Codeium AI coding assistant 🦾
- ✅ Containerized and remote development with Docker, Dev Containers and Snowflake ❄️ 🐳
- ✅ Enhanced DX settings, themes, and file view extensions 😎
To use this profile in VS Code or Cursor.sh, choose Settings... > Profiles > Import Profile and paste in this gist: https://gist.github.com/SiriusBits/b4d74fad310d3cd9dadcb92fe1724833
As with the extensions, you can forego importing these settings or tailor them to fit your specific needs. I've provided some explanation and reasoning to help you decide. For certain things, like the editor typeface, there are some prerequisites you'll need to satisfy.
For data-related coding I use Victor Mono, an open-source monospaced font with optional semi-connected cursive italics and programming symbol ligatures. The typeface is slender, crisp, and narrow, with a large x-height and clear punctuation, making it legible and ideal for code.
Important
Choice of coding font and related typographical features are, of course, entirely a matter of personal preference. I've used Fira Code and still use Dank Mono for web development. I prefer ligatures and I like cursive - and you might not, which is totally fine! I also often work in the terminal so a monospaced font is a must for me.
If you want to explore other options I recommend checking out Nerd Fonts and if you want to use Victor Mono like I am, you will need to install the VictorMono Nerd Font. You can do this manually or via Homebrew using the homebrew-cask-fonts
cask like so:
$ brew tap homebrew/cask-fonts # You only need to do this once!
$ brew install font-victor-mono-nerd-font
Enable Codeium Indexing & Search Engine. This feature allows chat and autocomplete models to have full codebase awareness, significantly improving autocomplete and chat quality. It also allows natural language search of your codebase.
Caution
When first enabled, Codeium will consume about 25% of CPU while it indexes the workspace. This should take < 10 minutes depending on your workspace size, once per workspace. CPU usage will return to normal automatically. If you use CoPilot or another coding assistant and don't install Codeium, remove these settings.
"codeium.enableConfig": {
"*": true,
"csv": true
},
"codeium.enableSearch": true,
Experimental enable fast CSV parsing and export to Parquet using the PyArrow engine. Requires the pyarrow package and pandas>=1.4.0. Read more about PyArrow support in Pandas.
Note
Remove if you don't want to use experimental features or don't plan to use Data Wrangler.
"dataWrangler.experiments.fastCsvParsing": true,
"dataWrangler.experiments.parquetExport": true,
See my notes on VictorMono Nerd Font
above.
"editor.fontFamily": "'VictorMono Nerd Font', Menlo, Monaco, 'Courier New', monospace",
"editor.fontLigatures": true,
"editor.fontSize": 17,
The interactive window will open to the right of the active code editor and 'perFile' will create a new interactive window for every file that runs a cell. Other options include:
- viewColumn = 'active' will open the interactive window in place of the active editor.
- viewColumn = 'secondGroup' will open the interactive window in the second editor group.
- creationMode = 'single' allows a single window.
- creationMode = 'multiple' allows the creation of multiple.
Tip
The executeSelection=true
allows you to highlight Python code and run it in an interactive window by pressing shift
+ enter
.
"jupyter.interactiveWindow.creationMode": "perFile",
"jupyter.interactiveWindow.textEditor.executeSelection": true,
"jupyter.interactiveWindow.viewColumn": "beside",
Settings for ensuring Ruff and Black Formatter work together and are scoped to just Python and Jupyter notebooks.
"notebook.codeActionsOnSave": {
"source.fixAll": true
},
"notebook.formatOnSave.enabled": true,
"[python]": {
"editor.codeActionsOnSave": {
"source.fixAll": true
},
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
Use Z shell for the integrated terminal in VS Code.
"terminal.integrated.defaultProfile.osx": "zsh",
These can be updated to whatever theme(s) you choose for your workbench, icons, and product icons respectively. Night Owl by Sarah Drasner includes a 'light' theme in addition to the original 'dark' theme. With auto-detect, the theme applied will switch based on the OS appearance. If you use Nightshift on macOS, the theme will toggle whenever your settings toggle the appearance on your Mac. Both the icon and product icon use the Atom Material Icons theme.
"workbench.colorTheme": "Night Owl",
"workbench.iconTheme": "material-icon-theme",
"workbench.preferredLightColorTheme": "Night Owl Light",
"workbench.preferredDarkColorTheme": "Night Owl",
"workbench.productIconTheme": "a-file-icon-vscode-product-icon-theme",
"window.autoDetectColorScheme": true,
A port of the Atom File Icons for VSCode. It replaces the icons and folder icons with better-suited icons, related to the file type, framework, or language.
Quickly generate docstrings for Python functions.
The uncompromising code formatter By using Black, you agree to cede control over the minutiae of hand-formatting. In return, Black gives you speed, determinism, and freedom from
pycodestyle
nagging about formatting. You will save time and mental energy for more important matters.
Codeium is the modern coding superpower, a free code acceleration toolkit built on cutting-edge AI technology. Currently, Codeium provides autocomplete, chat, and search capabilities in 70+ languages, with lightning-fast speeds and state-of-the-art suggestion quality.
Data Wrangler is a code-centric data cleaning tool integrated into VS Code and VS Code Jupyter Notebooks.
The Dev Containers extension lets you use a Docker container as a full-featured development environment.
Docker 🐳
Build, manage, and deploy Docker containerized applications from Visual Studio Code. It also provides one-click debugging of Node.js, Python, and .NET inside a container.
While not a requirement to use file nesting, if installed, this setup will use the File Nesting Updater extension to keep the
explorer.fileNesting.patterns
setting up-to-date with the latest file nesting configuration. This helps keep your workspace tidy despite the various dotfiles and configuration settings you have specified.
Similar to GitLens but less intrusive and easier to view (in my opinion). It provides a graphical interface to view and interact with your Git repository. It allows you to visualize your Git history as a graph and offers a range of features for managing and exploring your repository.
Pull .gitignore templates from the https://github.com/github/gitignore repository. Language support for .gitignore files.
Jupyter 🪐
Provides basic notebook support for language kernels that are supported in Jupyter Notebooks today, and allows any Python environment to be used as a Jupyter kernel. This extension bundle includes the following supporting extensions: - Jupyter Keymap - to provide Jupyter-consistent keymaps - Jupyter Notebook Renderers - to provide renderers for MIME types such as latex, plotly, vega, etc. - Jupyter Cell Tags and Jupyter Slide Show - to provide the ability to tag cells in notebooks and support for presentations
A Visual Studio Code theme from the amazing Sarah Drasner for all the night owls out there. Fine-tuned for those of us who like to code late into the night. Color choices have taken into consideration what is accessible to people with colorblindness and in low-light circumstances. Decisions were also based on meaningful contrast for reading comprehension and for optimal razzle-dazzle. ✨
Portable document format (PDF) viewer for Visual Studio Code.
Python 🐍
Rich support for the Python language (for all actively supported versions of the language: >=3.7), including features such as IntelliSense (Pylance), linting, debugging, code navigation, code formatting, refactoring, variable explorer, test explorer, and more. Includes supporting Pylance extension: - Pylance
Highlight CSV and TSV files and run SQL-like queries.
Ruff 🧹
An extremely fast Python linter and code formatter, written in Rust and compatible with the Black Formatter extension.
Snowflake ❄️
Connect to Snowflake, write and execute SQL queries, and view results without leaving VS Code.
View SQL files as notebooks. Execute cells and view query output.