VSenvA VSCode extension for adding project-specific directories to
Installation
What is this?The problemMost VSCode extensions for language servers and other command-line tools either expect that tool to be installed globally, or come bundled with their own version. This means if your project pins a specific version that's installed as a dev dependency instead of globally, the extension will either need to be explicitly configured to point to your project's version, or it might just not work at all. The issue is even worse when those tools are installed in a python environment, because for some
insane reason,
the scripts directory is different depending on your OS.
This means many extensions need to be configured using
disgusting polyglot scripts
if you want to be able to commit a The solutionThis extension loads (hopefully) before your other extensions do. It then modifies the UsageConfigure additional directories to add to the
Python environment detectionAs mentioned above, Python environments have a different scripts path on Windows and Unix-like operating systems. VSenv solves this by automatically detecting your Python environment using either the
Python or
Python Environments.
If an environment is detected, it's automatically added to the DisclaimerI don't know for sure how reliable this is. It seems to work with every extension I've tried, but it may not work for you if the other extension gets loaded first. It also relies on behavior in VSCode that may or may not be intentional, so it's possible that a future VSCode update may break this extension. |