-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Non-workspace locations for pyrightconfig.json
#1756
Comments
No, there's currently no way to do that. Each workspace root requires its own pyrightconfig.json file. Paths inside of pyrightconfig.json are assumed to be workspace-relative, so sharing a pyrightconfig.json would be problematic. Out of curiosity, if you're using VS Code, why are you not using Pylance? And is there a reason you are not using VS Code settings rather than a pyrightconfig.json file? I realize that there are configuration knobs provided in pyrightconfig.json that have no analog in VS Code settings, but these are more esoteric features. |
VS Code allows for non-workspace-relative paths in its settings. For example, you could have a setting that excludes
I am using VS Code + Pylance. Per this issue, the VS Code settings are insufficient to stop Pylance from attempting to index symlinks to very large subdirectories, which essentially breaks the Python language features. At any rate, thank you for the quick reply! |
The "exclude" config option is something we should probably consider exposing within VS Code settings. I think there's already an open issue on that in the pylance-release issue tracker. Feel free to upvote that issue, or create a new one if you can't find it. |
I'm not sure we have a dedicated issue for that, but microsoft/pylance-release#123 is close. Would be nice to have an issue for "add |
Done. Thanks for keeping this train rolling! |
I have several VS Code workspaces for copies of the same git repo:
I would like to use the same
pyrightconfig.json
for each of them without needing to add it to the git repository. Is there any way I can add it above my workspace roots and somehow configure the language server to point to it?The text was updated successfully, but these errors were encountered: