Add ruff LSP and Python tooling to Zed config

Add uv, python314, and ruff to extra packages.

Enable Python format‑on‑save, use ruff as formatter and language server,
and set tab size to 4.

Configure ruff LSP with a bash wrapper and detailed inlay‑hint options.
This commit is contained in:
2026-02-11 16:07:36 +01:00
parent e2d9522d89
commit a751485bf0
3 changed files with 36 additions and 1 deletions

View File

@@ -72,5 +72,27 @@
};
};
};
ruff = {
binary = {
path = lib.getExe pkgs.bash;
arguments = [
"-c"
"if [ -e flake.nix ]; then nix develop --command ruff server; else ruff server; fi"
];
};
initialization_options = {
check.command = "ruff check .";
inlayHints = {
maxLength = null;
lifetimeElisionHints = {
enable = "skip_trivial";
useParameterNames = true;
};
closureReturnTypeHints = {
enable = "always";
};
};
};
};
};
}