collective / collective.recipe.vscode

Buildout Recipe for Visual Studio Code
8 stars 8 forks source link

remove pythonPath in settings.json and replace it with...? #14

Open djay opened 4 years ago

djay commented 4 years ago

It's no longer used and you get annoying warnings asking if you want to remove it from your settings.json. see https://visualstudiomagazine.com/articles/2020/05/14/vs-code-python.aspx

Maybe there is a way to write it into launch.json or .env or maybe .direnv? see https://code.visualstudio.com/docs/python/environments (note these docs still mention pythonPath so they are out of date)

Otherwise I think you have to set it yourself which is annoying. Unless someone makes a buildout extension.

djay commented 4 years ago

I thought perhaps it would at least find the local python if I include ./bin in the PATH inside .vscode/.env. Didn't work

djay commented 4 years ago

I tried setting "python.venvPath" to the local bin and that seemed to work include it on the list you can pick from. But not as the first item so won't use that as default :( and then I tried it again and it didn't work. and I'm not sure if that worked just because I normally make the virtualenv the root of the buildout dir. Also tried WORKON_HOME and that didn't work either