Skip to content
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

Allow .vscode/settings.json per folder without using multi-root workspaces #181845

Closed
yegorski opened this issue May 2, 2023 · 5 comments
Closed
Assignees
Labels
config VS Code configuration, set up issues *duplicate Issue identified as a duplicate of another issue(s)

Comments

@yegorski
Copy link

yegorski commented May 2, 2023

Specifically we're interested in having the python.defaultInterpreterPath setting to be folder-specific. Right now in our Python monorepo, navigating between projects requires manual switching of the Python interpreter so that the pip packages and imports are recognized by the IDE.

I'm imagining the end state where each project in the monorepo has its .vscode/settings.json file and have VS Code read the settings from that file when a file from that project is open.

More context: Multi-root workspaces won't work here. We're using the Pants build tool. While it's a monorepo, it's more than just several top-level folder smooshed together. There are other metadata files at the top-level so we can't really have a project.code-workspace file because we'll need the . folder to be included and that causes the other folders to be duplicated in the explorer view.

Issues I found that are related but not applicable:

  1. Add ability to extend from other settings files #15909
  2. Add support for additional global config files (in addition to settings.json) #17634
  3. Allow several settings.json #147911
@brettcannon
Copy link
Member

This sounds more Python-specific than anything, so transferring over there.

@brettcannon brettcannon transferred this issue from microsoft/vscode May 3, 2023
@karrtikr
Copy link
Contributor

karrtikr commented May 9, 2023

It would be difficult to solve it from Python extension's perspective as this requires us to look for python.defaultInterpreterPath setting in various settings.json files in the workspace folder. If you would still like us to consider it please open a feature request in https://github.com/microsoft/vscode-python/issues.

I'm transferring it back to VSCode as this requires a general solution like #15909 IMO.

@github-actions github-actions bot added the info-needed Issue requires more information from poster label May 9, 2023
@karrtikr karrtikr removed info-needed Issue requires more information from poster triage-needed labels May 9, 2023
@karrtikr karrtikr transferred this issue from microsoft/vscode-python May 9, 2023
@karrtikr
Copy link
Contributor

karrtikr commented May 9, 2023

We've opened microsoft/vscode-python#21204 in Python extension to track this support.

@mjbvz mjbvz assigned sandy081 and unassigned mjbvz May 9, 2023
@sandy081 sandy081 added the config VS Code configuration, set up issues label May 23, 2023
@sandy081
Copy link
Member

/duplicate

#32693

@vscodenpa vscodenpa added the *duplicate Issue identified as a duplicate of another issue(s) label May 23, 2023
@vscodenpa
Copy link

Thanks for creating this issue! We figured it's covering the same as another one we already have. Thus, we closed this one as a duplicate. You can search for similar existing issues. See also our issue reporting guidelines.

Happy Coding!

@vscodenpa vscodenpa closed this as not planned Won't fix, can't repro, duplicate, stale May 23, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Jul 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
config VS Code configuration, set up issues *duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

8 participants