Open traversaro opened 1 week ago
I have seen this mentioned a few times on discord. But I think the best approach would be something similar to the micromamba vscode extension where the environment is loaded globally to the IDE. This gives all extensions access to the virtual environment.
In my opinion, this Is a must when you have multi-language project.
I wonder if changing the VSCode CMake extension (for example) would be worth it - for example here: https://github.com/microsoft/vscode-cmake-tools/blob/7b621f45ca9ab4df486f9ea3bcc5439034cea7a9/src/paths.ts#L251
However, if all extensions would be aware of the "pixi"-PATH then the CMake extension should work OOTB.
I am afraid that just setting the CMake path to the pixi's cmake is not enough. If the PATH is not modified to contain the environment executables or if CXX
/CC
env variables are not properly exported, CMake would not pick the pixi's compilers in place of the system ones.
I see that the vscode CMake extension has the concept of KitsController
, similar to the locator of the python extension. Maybe that is the way to go?
Problem description
It would be great for pixi ecosystem to have support to easily open in Visual Studio Code and have integration out of the box with pixi projects that build C++ code.
See: