Problem
The current fileTreeContentMode setting is a binary — either notes_only (markdown + PDF + HTML) or all_files. There's no way to say "show markdown, PDF, and CSV but not everything else." Power users with mixed vaults want finer control over what shows up in the tree.
Proposed setting
Add a fileTreeExtensionFilter: string[] setting — an ordered list of extensions that should be visible. An empty array means no filter (show everything, consistent with the current all_files behaviour). Extensions stored without the leading dot: ["md", "pdf", "txt"].
High-level implementation plan
1. Settings interface (settingsStore.ts)
Add fileTreeExtensionFilter: string[] to the Settings interface alongside the existing fileTreeContentMode and fileTreeShowExtensions fields.
2. Default + normalization (settingsStore.ts)
Default to [] (no filter). In the normalization pass, ensure the value is an array of non-empty strings and strip any leading dots so input like .md and md both work.
3. Filtering logic (FileTree.tsx, visibleEntries memo ~line 1790)
After the existing fileTreeContentMode check, apply the extension filter when the list is non-empty:
if (fileTreeExtensionFilter.length > 0 && entry.extension) {
return fileTreeExtensionFilter.includes(entry.extension.toLowerCase());
}
Folders are always shown regardless (same as today).
4. Settings UI (Developer or Navigation section in the settings panel)
A tag/chip input where users type an extension and press Enter to add it, with an ✕ to remove each one. Show a placeholder like pdf, txt, csv … when empty. Sits below the existing "Show file extensions" toggle.
Out of scope
- Glob or regex patterns (keep it simple for now)
- Per-folder overrides
- Hiding folders based on extension rules
Problem
The current
fileTreeContentModesetting is a binary — eithernotes_only(markdown + PDF + HTML) orall_files. There's no way to say "show markdown, PDF, and CSV but not everything else." Power users with mixed vaults want finer control over what shows up in the tree.Proposed setting
Add a
fileTreeExtensionFilter: string[]setting — an ordered list of extensions that should be visible. An empty array means no filter (show everything, consistent with the currentall_filesbehaviour). Extensions stored without the leading dot:["md", "pdf", "txt"].High-level implementation plan
1.
Settingsinterface (settingsStore.ts)Add
fileTreeExtensionFilter: string[]to theSettingsinterface alongside the existingfileTreeContentModeandfileTreeShowExtensionsfields.2. Default + normalization (
settingsStore.ts)Default to
[](no filter). In the normalization pass, ensure the value is an array of non-empty strings and strip any leading dots so input like.mdandmdboth work.3. Filtering logic (
FileTree.tsx,visibleEntriesmemo ~line 1790)After the existing
fileTreeContentModecheck, apply the extension filter when the list is non-empty:Folders are always shown regardless (same as today).
4. Settings UI (Developer or Navigation section in the settings panel)
A tag/chip input where users type an extension and press Enter to add it, with an ✕ to remove each one. Show a placeholder like
pdf, txt, csv …when empty. Sits below the existing "Show file extensions" toggle.Out of scope