Show hidden files, like dotfiles, in Obsidian.
Repository · Changelog · Community plugin · Related · Features · Installation · Usage · Contributing · Security
For first time users, read the installation section first!
This file is automatically opened on first install. You can reopen it in settings or command palette.
- Show files that are forcefully hidden in vanilla Obsidian.
- Toggle visibility of hidden files.
- Interact with hidden files normally like normal files.
- Install plugin.
Community pluginsInstall the plugin from community plugins directly.
- Manual
- Create directory
show-hidden-filesunder.obsidian/pluginsof your vault. - Place
manifest.json,main.js, andstyles.cssfrom the latest release into the directory.
- Create directory
- Building (rolling)
- Clone this repository, including its submodules.
- Install
pnpm(preferred) ornpm. See https://pnpm.io/installation for pnpm. - Run
pnpm installin the root directory (npm installis an acceptable fallback). - Run
pnpm obsidian:install <vault directory>in the root directory (npm run obsidian:install <vault directory>is an acceptable fallback).
- Obsidian42 - BRAT (rolling)
- See their readme.
- Enable plugin. Before you enable, please check § Usage.
- (optional) Configure plugin settings.
-
Before enabling the plugin, check if your vault contains dot folders with a lot of files (e.g. 100+ files). If yes, Obsidian will likely freeze (for a long time) when you enable the plugin, as Obsidian scans all files in the dot folders.
By default, the plugin excludes folders and files named
.gitor.venvat any level of the vault file tree. If your dot folders are excluded by the defaults, you can simply enable the plugin without freezing Obsidian. The defaults can be edited in plugin settings.If not, you should manually create
.obsidian/plugins/show-hidden-files/data.json, with the following contents as an example (excluding the comments):{ "showingRules": [ "+/", // Needed to include all hidden files and folders. // Add dot folders with a lot of files, e.g.: "-/\\.git(?:\\/|$)/u", "-/\\.venv(?:\\/|$)/u", "-/\\.aDotFolderWithManyFiles(?:\\/|$)/u", ] }
The example excludes folders and files named
.git,.venv, or.aDotFolderWithManyFilesat any level of the vault file tree. You can instead use"-.aDotFolderWithManyFiles/"to exclude a folder or file named.aDotFolderWithManyFilesat the vault root only. -
Enable the plugin.
-
Please also enable
Files & links > Detect all file extensionsfor the plugin to work properly. -
Other plugins will treat visible hidden files as normal files. This may cause issues such as treating plugin JavaScript files as user scripts. To resolve such issues, exclude those hidden files in the other plugins' settings or hide those hidden files in this plugin's settings.
Contributions are welcome!
This project uses changesets to manage the changelog. When creating a pull request, please add a changeset describing the changes. Add multiple changesets if your pull request changes several things. End each changeset with ([PR number](PR link) by [author username](author link)). For example, the newly created file under the directory .changeset should look like:
---
"example": patch
---
This is an example change. ([GH#1](https://github.com/ghost/example/pull/1) by [@ghost](https://github.com/ghost))This project uses the following tools to ensure code and commit quality:
- ESLint: Linting for TypeScript/JavaScript. Run with
pnpm run check(lint only) orpnpm run fix(auto-fix lint issues). - Prettier: Code formatting. Run with
pnpm run format(format all files) orpnpm run format:check(check formatting only). - markdownlint: Lints Markdown files. Run with
pnpm run markdownlintor auto-fix withpnpm run markdownlint:fix. - commitlint: Enforces conventional commit messages. Used automatically on commit via Husky.
- husky: Manages Git hooks. Pre-commit runs
lint-stagedand pre-push runs commitlint. - lint-staged: Runs linters on staged files. Markdown files are auto-fixed before commit.
Lint-staged note: The lint-staged configuration (
.lintstagedrc.mjs) invokes formatter/linter binaries directly (for exampleprettier --write,eslint --cache --fix,markdownlint-cli2 --fix) so that the list of staged files is passed through to the tool. Invoking these vianpm runwould prevent lint-staged from forwarding filenames and cause the tool to operate on its default glob (or the entire repo). Usepnpm run formatto format the entire repository when needed.
To set up locally:
- Run
pnpm installto install dependencies and set up hooks. - On commit, staged Markdown files will be linted and auto-fixed.
- Commit messages are checked for conventional format.
You can manually run:
pnpm run check— lint all code (no formatting)pnpm run fix— auto-fix lint issues (no formatting)pnpm run format— format all code with Prettierpnpm run format:check— check formatting with Prettierpnpm run markdownlint— check all Markdown filespnpm run markdownlint:fix— auto-fix Markdown filespnpm run commitlint— check commit messages in range
Configuration files:
.eslintrc.*oreslint.config.mjs— ESLint rules.prettierrc— Prettier rules.prettierignore— Prettier ignore patterns.markdownlint.jsonc— markdownlint rules.commitlintrc.js— commitlint config.husky/— Git hooks
This repository uses Vitest for fast unit tests. Tests live under tests/ and should be named *.spec.ts or *.spec.js.
- Run locally (non-interactive, coverage):
pnpm testornpm run test(runsvitest run --coverage). - Run locally (interactive / watch):
pnpm run test:watchornpm run test:watch. - Git hooks: The pre-push hook runs
npm run test(see.husky/pre-push) and will block pushes if tests fail; usingpnpm testlocally is equivalent.
See vitest.config.mts for minimal config and further instructions.
The todos here, ordered alphabetically, are things planned for the plugin. There are no guarantees that they will be completed. However, we are likely to accept contributions for them.
- (none)
We hope that there will never be any security vulnerabilities, but unfortunately it does happen. Please report them!
| Version | Supported |
|---|---|
| rolling | ✅ |
| latest | ✅ |
| outdated | ❌ |
Please report a vulnerability by opening an new issue. We will get back to you as soon as possible.
