-
Notifications
You must be signed in to change notification settings - Fork 133
python.autoComplete.extraPaths setting does not allow for environment variable substitution #1783
Comments
Thanks for the bug report! We just wanted to quickly acknowledge we received it and we will be triaging it as soon as we can. |
@hetsch, by default VS Code supports variable substitution for only some of its own settings. Extensions can support variable substitution for their own settings, but they don't get much help from the VS Code API. In the case of the Python extension, we do support some variable substitution (see the supported variables). Unfortunately our documentation isn't very helpful here (I've opened a separate issue to improve them). The main problem in your case is that the extension currently does not support substitution for Otherwise I can change this issue to a feature request if you want. Just let us know. Thanks! |
@ericsnowcurrently Sorry for responding so late. I can confirm that variable substitution worked before. I versioned my VSCode settings.json file and it seems that the bug was introducted after 10. Oct. 2019. Thank's for your help |
@hetsch, I was able to reproduce the problem, both under the latest release of the extension and with the September release. From what I can tell, the extension is doing the substitution properly. However, the language server also interprets your settings (sent by VS Code over the LSP) and it does not do any substitution. So I'm going to move this issue over to that team to see what can be done. |
Who is in charge of substitution? I thought the editor should have already preprocessed this data before it hits us. There are so many flavors of substitution that it's a bit much to try and do this in the LS itself. |
The only change that would have happened around this was that the LS started reading the user settings directly rather than the initialization options for things like paths, but that change happened a few months ago (#1492). |
Environment data
"python.jediEnabled"
set to; more info How to update the language server to the latest stable version vscode-python#3977): False, Microsoft Python Language Server version 0.4.58.0Expected behaviour
should resolve to a path e.g.:
/home/user/extra_packages
Actual behaviour
In my Output panel and
Python Language Server
target, it is resolved toIf I hardcode my homedirectory in the setting
python.autoComplete.extraPaths
it works fine.Steps to reproduce:
Just try to replace
/home/user/extra_packages
with${env:HOME}/extra_packages
in thepython.autoComplete.extraPaths
setting.The text was updated successfully, but these errors were encountered: