Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/integration/editor/pycharm.md
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,9 @@ lint = { features = ["lint"], no-default-feature = true }

Now you as a user can run `pixi shell`, which will start the default environment.
In production, you then just run `pixi run -e prod COMMAND`, and the minimal prod environment is installed.

## Activate the `pixi` project environment
Comment thread
Hofer-Julian marked this conversation as resolved.
Outdated

An alternative approach is to use [`direnv`](../third_party/direnv.md) via a
[Jetbrains `direnv` plugin](https://plugins.jetbrains.com/plugin/15285-direnv-integration)
which can be used to activate `pixi`.
12 changes: 12 additions & 0 deletions docs/integration/editor/vscode.md

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Python extension also has proper pixi support, we should mention that IMO

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean this https://code.visualstudio.com/docs/python/python-quick-start extension, correct?
I do not see an explicit mention of pixi.
I suppose it is something similar to conda?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes it's this extension. maybe add an image guide on how to do it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, If we have a proper vscode section, the Python extension should be mentioned as well 🙂

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not entirely sure how to use the python extension with pixi.
I saw that there is some effort to make a pixi conda but I do not think that is the way to go.
I am looking for a way to use conda run ... as that should be translatable to pixi run ....
But, I am not finding that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose trampolines could be used as the target of
image
but, trampolines are not provided as part of project workspaces.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose it comes down to the settings.yml for the python plugin:

https://code.visualstudio.com/docs/python/settings-reference

It is not obvious to me how this should be configured.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should no configuration.

I just created a fresh Pixi workspace with Python, started vscode in it and vscode immediately selected the pixi environment. Maybe @baszalmstra can check if something is broken on Windows at the moment?

Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[VSCode](https://code.visualstudio.com/) is a popular develop environment.

To use pixi inside of vscode, follow these steps:
Comment thread
Hofer-Julian marked this conversation as resolved.
Outdated

* Create a `pixi.toml` file.

See [`direnv`](../third_party/direnv.md).
* Install `direnv`.
* Add an `.envrc` to the project.

This [vscode extension](https://marketplace.visualstudio.com/items?itemName=mkhl.direnv).
* Install the `direnv` vscode extension
5 changes: 5 additions & 0 deletions docs/integration/third_party/direnv.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ direnv: unloading
$ which python
python not found
```

While `direnv` comes with [hooks for the common shells](https://direnv.net/docs/hook.html),
these hooks into the shell should not be relied on when using and IDE.
The `direnv` package does not include hooks for integrated develop environments.
That said there is typically, a plugin or extension available.
Comment thread
Hofer-Julian marked this conversation as resolved.
Outdated
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ plugins:
"ide_integration/pycharm.md": "integration/editor/pycharm.md"
"ide_integration/r_studio.md": "integration/editor/r_studio.md"
"ide_integration/devcontainer.md": "integration/editor/devcontainer.md"
"ide_integration/vscode.md": "integration/editor/vscode.md"
"advanced/authentication.md": "deployment/authentication.md"
"advanced/channel_priority.md": "advanced/channel_logic.md"
"advanced/github_actions.md": "integration/ci/github_actions.md"
Expand Down