being able to select folders to ignore/exclude in DV settings, so they don't get indexed
Is your feature request related to a problem? Please describe.
Yes, this one. I use Logstravaganza to save the console logging in a file to check them after Obsidian crashes again and the plugin doesn't allow to save logs outside the vault (already opened a request for that there). My logs get spammed with this:
Describe the solution you'd like Just the ability to exclude/ignore certain vault paths like many other plugins have. Could solve this specific issue but could generally be useful for people who keep weird things in their vault or have folders that they never want to use dataview on.
Describe alternatives you've considered As mentioned for this specific issue I opened an issue with Logstravaganza that you can check out here: https://github.com/czottmann/obsidian-logstravaganza/issues/17
https://github.com/blacksmithgu/obsidian-dataview/discussions/2619
A temporary patch to exclude certain folders from being indexed by dataview:
Open your .obsidian/plugins/dataview/main.js.
Search for async _initialize(files).
Add the following line(s) at the top of that async function:
files = files.filter(file => !file.path.startsWith('excluded_folder1/'));
You can repeat this line many times for each of the subfolder to exclude.
/** Internal asynchronous initializer. */
async _initialize(files) {
files = files.filter(file => !file.path.startsWith('excluded_folder1/'));
files = files.filter(file => !file.path.startsWith('excluded_folder2/'));
files = files.filter(file => !file.path.startsWith('excluded_folder3/'));
let reloadStart = Date.now();
let promises = files.map(l => this.reload(l));
let results = await Promise.all(promises);
You need to re-apply the patch everytime the plugin is updated.