Negation Pattern in python.analysis.exclude
#7129
-
|
I've read https://github.com/microsoft/pylance-release/wiki/Opening-Large-Workspaces-in-VS-Code but I still have a question: is it possible for me to exclude everything in my monorepo except one folder? I'd like to do: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
|
Internally it's actually a regex comparison (not a real glob). This code here is what ultimately gets called to see if a file is excluded or not: The glob is converted to a regex here: Which doesn't have support for I think this might work? (Copilot generated it for me) It needs to not match packages/assistant/svc/python, but match everything else. |
Beta Was this translation helpful? Give feedback.
Rather than excluding all subdirectories but one, you could "include" only that directory. That wouldn't require negation.
"python.analysis.include": ["packages/assistant/svc/python"]