vscodium: use ruff for python formatting instead of black

This commit is contained in:
Trolli Schmittlauch 2025-05-21 16:14:09 +02:00
parent 603411fa64
commit 226cb11480

View file

@ -16,6 +16,7 @@
with pkgs.vscode-extensions;
[
ms-python.python
charliermarsh.ruff
vscodevim.vim
yzhang.markdown-all-in-one
bungcip.better-toml
@ -38,12 +39,6 @@
version = "2023.3.12681020";
sha256 = "sha256-rhed7CQlvxksVCGc9nPU2oYQWtXcAV5TzuG63e8Y3zM=";
}
{
name = "black-formatter";
publisher = "ms-python";
version = "2023.5.12771008";
sha256 = "sha256-lJG0RRUUMhQGs2a6oBtoqt+uY1kSJ0+cbmaP07hNh2o=";
}
{
name = "vscode-pets";
publisher = "tonybaloney";
@ -90,16 +85,17 @@
"breadcrumbs.showClasses" = true;
"breadcrumbs.showFunctions" = true;
"gitlens.codeLens.symbolScopes" = [ "!Module" ];
"editor.defaultFormatter" = "ms-python.black-formatter";
"editor.defaultFormatter" = "charliermarsh.ruff";
"editor.formatOnSave" = true;
};
"python.experiments.enabled" = false;
"python.languageServer" = "Jedi"; # don't use proprietary pylance server
"python.defaultInterpreterPath" = "${defaultPython}/bin/python";
"black-formatter.path" = [ "${pkgs.python3Packages.black}/bin/black" ];
"black-formatter.importStrategy" = "fromEnvironment";
"mypy-type-checker.path" = [ "${pkgs.python3Packages.mypy}/bin/mypy" ];
"mypy-type-checker.importStrategy" = "fromEnvironment";
"mypy-type-checker.args" = [ "--ignore-missing-imports" ];
"ruff.path" = [ (lib.getExe pkgs.ruff) ];
"ruff.importStrategy" = "fromEnvironment";
"gitlens.telemetry.enabled" = false;
"vim.highlightedyank.enable" = true;
"vim.history" = 500;