Skip to content

Repository files navigation

Show Hidden Files

English | 简体中文

Show hidden dot-files, dot-directories, and symlinks in Obsidian's file explorer — and open any non-Markdown file (code, config, logs, ...) in a syntax-highlighted viewer/editor instead of Obsidian refusing to show it.

Why

Obsidian's file explorer hides anything starting with . and only really knows how to display Markdown, images, audio/video, and PDFs. If your vault (or a symlinked directory inside it) contains .gitignore, .env, config files, or plain source code, you either can't see them at all or can't open them meaningfully. This plugin fixes both problems.

Features

Hidden files in the file tree

  • Toggle via the ribbon icon (eye / eye-off) or the "Toggle hidden files visibility" command
  • Dot-files and dot-directories (.obsidian, .git, .env, ...) appear in the file explorer when enabled
  • Symlinks are followed and shown too — not just dot-prefixed ones. A symlinked directory anywhere in the vault (e.g. local/harness/artifacts/<link>) gets its target content injected into the tree, whether or not the link itself starts with a dot
  • Stays in sync as the underlying filesystem changes (deletes, renames) — a debounced watcher reconciles the injected entries so deleted paths don't linger as stale tree items
  • Optional italic + dimmed styling for hidden entries, so they're visually distinct from real vault content
  • Configurable exclusion list (.git, .DS_Store, .obsidian, .trash by default) — supports exact names, full vault paths, and prefix/* wildcards, so things like .git's huge internal tree don't get enumerated and slow the explorer down

Code viewer for non-Markdown files

Opens 40+ file types (.js/.ts/.py/.go/.rs/.java/.c/.json/.yaml/.toml/.sql/.sh/.env/ .gitignore/..., plus filename-based detection for Dockerfile/Makefile/dotless configs) in a dedicated view instead of Obsidian's "no viewer available":

  • Preview mode — renders through Obsidian's own Markdown renderer inside a code fence, so it gets your theme's normal syntax highlighting, with real line numbers and a wrap/no-wrap toggle
  • Edit mode — a real CodeMirror 6 editor (syntax highlighting, bracket matching, fold gutter, undo history) with Mod+S to save
  • Copy button for the full file content, plus double-click the path label in the toolbar to copy the absolute or vault-relative path
  • Files Obsidian already handles natively (Markdown, images, PDF, audio, video — the exact list is configurable) are left alone; this view only takes over what Obsidian can't already render

Fine-grained control

  • Native extensions list — extensions that should always fall through to Obsidian's own viewer instead of being captured by this plugin (defaults to Obsidian's actual built-in support: md/canvas/base, common image/audio/video formats, pdf)
  • Force code-view path regexes — make specific paths always open in the code viewer even if they'd normally get Obsidian's native handling (e.g. force .md files under a templates/ folder to open as raw text instead of rendered Markdown)

Desktop + mobile

Filesystem access (symlink following, direct fs reads for speed) is desktop-only — gracefully degrades to Obsidian's own async adapter.list()/adapter.read() on mobile, where hidden-file visibility depends on whatever the platform's adapter already returns.

Settings

Setting Default Notes
Show hidden files/directories Off Master toggle; also available via ribbon icon / command palette
Italic hidden files Off Visual distinction only, doesn't affect functionality
Excluded paths .git, .DS_Store, .obsidian, .trash One per line; exact name, full path, or prefix/*
Obsidian-native extensions md/canvas/base + images + audio + video + pdf Extensions that skip this plugin's code viewer entirely
Force code-view path regexes (empty) One regex per line, matched against vault-relative path

Note: the plugin's own in-app settings tab UI is currently labeled in Chinese (显示隐藏文件/目录, 屏蔽的路径, ...) — the table above is what each one means/does, in English.

Install

Not on the community plugin registry — clone/copy into <vault>/.obsidian/plugins/show-hidden-files/ and enable it in Settings → Community plugins.

npm install --legacy-peer-deps   # obsidian@latest currently has a peer-dep mismatch
                                  # against the pinned @codemirror/* versions in package.json
npm run build

License

MIT

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages