You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(vscode): replace per-folder workspace entries with single obs://
Replace N file:// workspace folders (one per autoMount entry) with a
single obs://<vault>/ workspace folder using the registered
FileSystemProvider. Mounted entries appear as children under the vault
root, filtered by the provider's readDirectory() at root level.
- Add #autoMount field and setAutoMount() to ObsidianFileSystemProvider
- Filter root readDirectory() to show only autoMount entries
- Fire Created/Deleted events per entry so Explorer refreshes without
window reload
- Simplify addVaultWorkspaceFolder() to create one obs:// folder
- Avoid removing/re-adding workspace folder on autoMount config changes
- Preserve backward-compat detection of old file:// managed folders
Assisted-by: Claude
Copy file name to clipboardExpand all lines: packages/vscode/README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ Browse, search, and edit your [Obsidian](https://obsidian.md) vault directly in
12
12
-**Mount vault folders or individual notes** into the Explorer tree view
13
13
-**Browse and read** Markdown files through the `obs://` virtual file system
14
14
-**Edit existing files** with writes going directly to the vault on disk
15
-
-**Wikilink navigation**, click `[[links]]` in Markdown to jump between notes (resolves to `file://` paths for seamless navigation in workspace folders)
15
+
-**Wikilink navigation**, click `[[links]]` in Markdown to jump between notes
16
16
-**Search notes** via Quick Pick across all vault Markdown files
17
17
-**Open in Obsidian**, jump to the current file in the Obsidian app
18
18
-**Copy path** as `obs://` URI to the clipboard (`Shift+Alt+Cmd+C` on `obs://` files)
@@ -52,19 +52,19 @@ All three toggle settings (`explorer`, `statusBar`, `workspace`) take effect imm
52
52
53
53
### Workspace Folder
54
54
55
-
When `obsidianVFS.workspace` is enabled, the extension adds each `autoMount` folder as a `file://` workspace folder pointing to the actual directory on disk, named **obs://\<folder\>**. Because these are native file-system paths, VS Code's built-in file indexer (`ripgrep`) can index them — so vault files appear in **Quick Open** (`Cmd+P`) and **Search** (`Ctrl+Shift+F`).
55
+
When `obsidianVFS.workspace` is enabled, the extension adds a single **obs://\<vault\>** workspace folder using the `obs://` virtual filesystem. Mounted `autoMount` entries appear as children under this root — the Explorer shows one vault entry instead of one per folder. VS Code's **Search** (`Ctrl+Shift+F`) and **Quick Open** (`Cmd+P`) work across mounted content through the `FileSystemProvider`.
56
56
57
-
The `obs://` FileSystemProvider remains registered for internal operations (stat, read, write, file watching). All user-facing navigation — wikilinks, search results, tree view items — resolves to `file://` URIs so they work seamlessly with workspace folders.
57
+
All file operations — stat, read, write, directory listing, and file watching — go through the `obs://` provider, which enforces `allowed`/`blocked` security rules from [`.obsidian/obsidian-vfs.json`](../../README.md#vault-configuration) at every level.
58
58
59
59
**Requirements:**
60
60
61
-
- At least one local folder must be open — vault folders are appended to the workspace folder list to avoid triggering an extension host restart.
61
+
- At least one local folder must be open — the vault workspace folder is appended to the list to avoid triggering an extension host restart.
62
62
63
63
**Notes:**
64
64
65
-
-`autoMount` entries outside `allowed` or inside `blocked` (from [`.obsidian/obsidian-vfs.json`](../../README.md#vault-configuration)) are silently skipped. However, content *within* a mounted workspace folder is not filtered — because these are native `file://` folders, VS Code browses them directly from disk. Use the **Explorer tree view** for security-enforced browsing; workspace folders are the search and Quick Open surface.
66
-
-The Explorer tree view and the workspace folders both appear in the sidebar. This duplication is an accepted trade-off — the tree view provides custom UI (welcome view, context menus) with `allowed`/`blocked` enforcement, while the workspace folders enable Quick Open and cross-extension visibility.
67
-
- The vault's `.git` repository is automatically added to `git.ignoredRepositories` (user-level setting) when workspace folders are mounted, preventing VS Code's Git extension from listing it in Source Control. The entry is removed when `obsidianVFS.workspace` is disabled.
65
+
-The Explorer tree view and the workspace folder both appear in the sidebar. The tree view provides custom UI (welcome view, context menus), while the workspace folder enables Quick Open and cross-extension visibility. The tree view uses `file://` URIs for opening files, which enables native features like Git integration.
66
+
-`autoMount` entries outside `allowed` or inside `blocked` are filtered from the workspace folder root listing. The core security layer remains as defense-in-depth for navigation into subdirectories.
67
+
- The vault's `.git` repository is automatically added to `git.ignoredRepositories` (user-level setting) when the workspace folder is mounted, preventing VS Code's Git extension from listing it in Source Control. The entry is removed when `obsidianVFS.workspace` is disabled.
Copy file name to clipboardExpand all lines: packages/vscode/package.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -127,7 +127,7 @@
127
127
"obsidianVFS.workspace": {
128
128
"type": "boolean",
129
129
"default": true,
130
-
"description": "Add the vault as a workspace folder for Explorer browsing. Requires at least one local folder open."
130
+
"description": "Add the vault as a single obs:// workspace folder for Explorer browsing. Mounted entries appear as children under the vault root. Requires at least one local folder open."
0 commit comments