-
Notifications
You must be signed in to change notification settings - Fork 227
Sung/vscode-env-vars #4803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sung/vscode-env-vars #4803
Conversation
…g/vscode-env-vars
Co-authored-by: Trey Spiller <[email protected]>
Co-authored-by: Trey Spiller <[email protected]>
Co-authored-by: Trey Spiller <[email protected]>
docs/guides/vscode.md
Outdated
- Set the environment variables in the python environment that the extension uses. You can find detailed instructions [here](https://code.visualstudio.com/docs/python/environments#_environment-variables) | ||
|
||
### Python environment woes | ||
#### Troubleshooting Environment Variables |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a slightly werid hierarchy:
Troublehsooting
Environment variables
Troubleshooting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removed subheader
docs/guides/vscode.md
Outdated
- Open VSCode from a terminal that sets environment variables in its configuration file (e.g., `.bashrc` for Bash or `.zshrc` for Zsh). The variables will automatically be picked up by the language server only if you explicitly export them in the shell configuration file like `export ENV_VAR=value`. | ||
- Use environment variables pulled from somewhere else dynamically (e.g. a `.env` file) in your root project directory. This will automatically be picked up by the language server. | ||
- Set the environment variables in the python environment that the extension uses. You can find detailed instructions [here](https://code.visualstudio.com/docs/python/environments#_environment-variables) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't quite what was intended beforehand, but I'm happy to clarify it.
- Open VSCode from a terminal that has the variables set is not about opening shells that have the variables set, if you open VSCode from a terminal with env vars set, it inherits them.
That's different to
-
The LSP server runs in your shell, and anything you have configured in there gets picked up
-
You can manually pull in vars in a Python config file as you wish.
-
.env
gets pulled because of the Python environment setup. It's not a separate thing. That's how it's being pulled in
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Updated for accuracy.
docs/guides/vscode.md
Outdated
3. Print the environment variables based on the instructions above to verify the changes have taken effect. | ||
|
||
### Python environment troubleshooting |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Same here RE title
Troubleshooting
Python environment troubleshooting
The additional troubleshooting feels a little redundant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replaced with "issues"
…sqlmesh into sung/vscode-env-vars
…g/vscode-env-vars
Co-authored-by: Ben <[email protected]>
Co-authored-by: Ben <[email protected]>
Based on the newest updates to env var debugging with the extension.