I think this is somewhat different from graph filtering. I really like the .gitignore-like approach, as I also want to exclude specific folders (automatically generated Memex and fleeting notes within Zettelkasten).
I agree with a solution similar to .gitignore. Placing a file such as .obsidianignore in the respective folder would solve all my headaches with random, unrelated notes (e.g., partials / transclusions) showing up in linking popup.
I also use Obsidian for Zettelcasten and have similar problems but I would prefer some filter customization instead of simple .gitignore.
About my case. I use folders like classes. One group of folders is References. One note is one reference. It might ba a video or web page or note in Evernote or note with description of a file and etc. I don’t want to see it on graphs (untill it’s not a local graph of the reference note) and search results but I I’d like to see hints with possible names when I do want to link a note with some reference note.
Possible solution is to add preferenceses for each folder with options:
Notes in folder appear on graph
Notes in folder appear on local graphs
Notes in folder appear in hints with options
As usual
Only after entering of name of folder (like when you type a name of a class and after adding “.” you see an autocompletion suggestion with possible subclasses which are notes in the folder)
Do not appear
If you decide to add preferences for each folder, it would be great to see also default templates for notes, created in folder.