pixi icon indicating copy to clipboard operation
pixi copied to clipboard

Mention VS Code support in pixi docs

Open cdeil opened this issue 1 year ago • 4 comments

Problem description

I think since recently (see #411) pixi supports VS Code.

Could you please mention this at https://pixi.sh/latest/ with some instructions how to use it properly?

Are there any steps / gotchas, e.g. to exclude the .pixi folder from project search or anything else to make it work well?

Currently only support for JupyterLab, Pycharm and RStudio is mentioned:

Screenshot 2024-08-11 at 22 48 02

cdeil avatar Aug 11 '24 20:08 cdeil

It seems VS Code can't detect the pixi env automatically. I had to first create a python script and use VS Code to enter the python interpreter path manually. After that, creating a Jupyter Notebook can select the pixi python interpreter.

https://github.com/prefix-dev/pixi/issues/411#issuecomment-2107344663

giswqs avatar Sep 29 '24 04:09 giswqs

In https://github.com/FreeCAD/FreeCAD/issues/20003 I go over some problems and my current solutions to using pixi with VSCode on FreeCAD's code base. (Just to be clear: I am a very minor FreeCAD contributor, and I am not trying to represent that project in this comment.)

One update though, currently I am using the clangd extension and not the ms c++ one. I am using the MS CMake extension though.

The relevant parts are:

  • In a cmake user preset, I have set"cmakeExecutable": "${sourceDir}/conda/pixi-cmake.sh",
  • that script does pixi run --verbose --manifest-path /Users/<username>/Documents/src/FreeCAD cmake "$@" (I still need to see if I can remove the path to the project from there, since it is system specific obviously)

One other thing: In the newest VsCode (Feb 2025) they added this: https://code.visualstudio.com/updates/v1_98#_shell-environment

Extensions are able to access the user's currently active shell environment information for pwsh, zsh, bash, and fish shell that are opened from the VS Code integrated terminal. This is only available when terminal.integrated.shellIntegration.enabled is enabled.

Oh, I should mention that I have NOT tried the pixi vscode extension. I read the docs, and it did not indicate that it would help with the problem of making the pixi environment visible to VsCode/CMake/etc.

tringenbach avatar Mar 28 '25 15:03 tringenbach

Hi, can this issue be assigned to me if possible?

musabsarmadmir avatar Apr 25 '25 16:04 musabsarmadmir

just create a pr, the possibility that two people are working on the same thing for an issue that's almost a year old is quite slim

pavelzw avatar Apr 26 '25 08:04 pavelzw