Minimal VSCode settings and extensions configuration for Python with ruff
This morning while working on my AoC submission, I wondered what the simplest procedure was for sharing a minimal setup for editing Python in Visual Studio Code using ruff for formatting, linting and import sorting, and doing all of that automatically on save.
It turns out that you can just store the following extensions.json
and settings.json
in the .vscode
sub-directory of your source directory, and all of the above will be done. As a bonus, you can use the ruff.toml
example below to customise your ruff setup.