5

Highlighting a symbol, Right-Click --> Find All References (or Go To References) brings up a pane with all usages of that symbol in every file in my workspace. Unfortunately this includes .ipynb_checkpoints/* files and others making it hard to comb through results.

Following this answer, I successfully removed __pycache__ files by adding **/__pycache__ to files:exclude in my User Settings. But adding **/.ipynb_checkpoints/** (and similar globs) there, nor to Files: Watcher Exclude did anything. Also tried this setting in my remote ssh settings and workspace settings.

Anyone know how to filter these references? FYI I'm running VS code 1.62.2 on Windows 10 and my configured remote SSH python executable is Python version 3.7 in a conda environment.

Wassadamo
  • 1,176
  • 12
  • 32
  • doesn't the glob need to be `**/.ipynb_checkpoints/**/*`? I thought globs couldn't end in a `**` or they did weird things or matched folders but I may be wrong. – Tadhg McDonald-Jensen Nov 16 '21 at 02:04
  • I think you just need `**/dir_name`, which excludes any directory by that name in any part of the tree. I'm not sure what `**/dir_name/**` would do? Ref => https://code.visualstudio.com/docs/supporting/faq?ref=hvper.com#_vs-code-gets-unresponsive-right-after-opening-a-folder – GCUGreyArea Jul 08 '22 at 07:50

1 Answers1

1

Exclude from "Find All References" can be done via pylance setting.

{
        "python.analysis.exclude": [
        "**/build"
    ]
}
Li-chih Wu
  • 1,002
  • 1
  • 11
  • 19