I have a very large project directory which consists of about 2% python and 98% other stuff, including millions of files and hundreds of gigabytes of data.
I want to use VSCode just for that 2% of python.
The trouble is that the python files are split up under two different subfolders under the project root.
I have two options:
- Use "Add Folder" once to add the root of the project to VSCode, and then exclude all directories which are not python.
- Use "Add Folder" twice to add the two subdirectories of the project root to VScode
I'd like to avoid option #1 because there are too many other folders to try to exclude. It is a pain, unless there was a way to "whitelist" include subdirectories into the project instead of having to enumerate all the ones to disclude. Searches tend to take really long when I set up the project this way because I inevitably forget to exclude some subdirectory that has massive amounts of data.
If I go with the second option, I run in to a lot of issues with python analysis -- it doesn't understand my imports which are all rooted at the true root of the project (and not the roots of the two subfolders). This is solved by manually setting the project's python import path.
Another issue I'm running in to is using pyright -- vscode will look for a pyrightconfig.json in each of the two subfolders of python that I add. Is there some way to manually configure a location for pyrightconfig.json for VSCode's python analysis? What I would like to do is point it at the pyrightconfig.json that's in a common parent folder of the two added subfolders. (the true root of my project).
Generally speaking, how do people set up VSCode to work nicely in a very large folder where there are small amounts of python dispersed throughout?