prefix-dev / pixi

Package management made easy
https://pixi.sh
BSD 3-Clause "New" or "Revised" License
3.4k stars 194 forks source link

Improve the Python experience on VSCode #2444

Open ruben-arts opened 2 weeks ago

ruben-arts commented 2 weeks ago

There are notable issues with the experience in VsCode which should be fixed.

This is going to be a tracking issue.

bollwyvl commented 1 week ago

Anecdotally, pixi run -e env-with-python code . works like a champ. On some projects, env-with-python needs some preflight, so I actually make a task for code (and/or whatever IDEs a team uses) and env for it that includes all the dependencies a python language server might care for (e.g. test, lint, etc.) but without any tasks to make the CLI UX awful.

Without knowing more, before diving head-first into the vscode walled garden, please consider whether pixi (or an optional pixi-ls) could improve the experience for vscode and other language server clients by implementing features in a Language Server, not solely in a vscode extension.

For example: when editing a package.json, one gets helpful completions of npm package names and version specs, respecting the local package manager settings for private repos. In pixi.toml (with taplo and e.g. even better toml), there is no such help. Other things that taplo can't quite do: making a depends-on on a non-existent task, or an env with against a missing feature.

The pixi-in-pyproject.toml experience is... pretty hard to use... indeed, next to schema/manifest/schema.json, a schema/pyproject/schema.json which wrapped the schema (and its deviations from pixi.toml) under [tool.pixi] and then getting that in the schema store (buh) would be helpful.