Ignore/exclude completely files or a folder from all obsidian indexers and parsers

So I’m aware of the Files & Links > Excluded files feature, and have seen several other threads here discussing specific needs like excluding a path from quick view results, but not addressing a general need to make certain paths invisible to Obsidian entirely.

Use case or problem

I want to use Obsidian to manage / author documentation in my git repos for various development projects. The git repos would exist as subdirectories (submodules) underneath my Obsidian vault. I plan to use the Obsidian Git plugin to sync.

The problem is that in the git repositories, my other working files also exist and Obsidian looks at all of them, everywhere. I really only want Obsidian to deal with markdown files and selected other files. Attachments would specifically be stored under attachments dirs.

The result of this is that Obsidian indexes thousands of files that I don’t care about… like READMEs in node_modules etc… and it ends up unusably slow. To the point where file operations take upwards of 10s to complete.

I imagine that this is a fairly huge blocker for any developer who wants to seriously use Obsidian to support documentation in their working repositories, which is where Obsidian would really shine - documentation is often hard to make sense of in dev repos.

I’m happy to tell Obsidian where to look or not look. I’ve already configured the Excluded files feature with Regex accordingly, but it seems to make no difference to what Obsidian indexes.

Proposed solution

The .obsidianignore file that was recommended in another thread is a great idea.

Another option is to enable a ‘Whitelist’ mode, where Obsidian starts off indexing nothing, and you specifically give it paths in glob syntax to include.

Also, configuring Obsidian to respect .gitignore would be incredibly useful.

Current workaround (optional)

I haven’t found a way around this. I’ve tried the existing features (that I know about) to no avail.

Related feature requests (optional)

17 Likes