A lightweight VS Code / Cursor / Antigravity extension that adds a quick toggle button to the File Explorer view toolbar to show and hide gitignored files.
Features
- 👁️ One-click Toggle: Easily show or hide gitignored files directly from the Explorer view header.
- 🔄 Persistent State: Uses VS Code's native
explorer.excludeGitIgnoreconfiguration, which keeps your preference persistent across reloads. - ⚙️ Synchronized State: The toolbar icon dynamically updates when settings are changed elsewhere (e.g., manually in
settings.json). - 🚀 Default Active: Automatically hides gitignored files by default on first install.
Usage
Once installed, a new button will appear in the top-right toolbar of the File Explorer view (next to the "New File" and "Collapse Folders" buttons):
- Hide Gitignored Files (
$(eye-closed)): Click to hide gitignored files. - Show Gitignored Files (
$(eye)): Click to show gitignored files.
Development and Testing
To test the extension locally:
- Open this project directory in VS Code / Cursor / Antigravity.
- Run
npm installto install dependencies. - Press
F5(or go to the Debug panel and select Run Extension) to launch an Extension Development Host window. - In the new host window, open a workspace with a
.gitignorefile and test clicking the toggle button in the Explorer title toolbar.
Available Scripts
npm run watch: Bundles the project usingesbuildand watches for any changes.npm run compile: Compiles the project usingesbuildfor production.npm run compile-tests: Type-checks the TypeScript code.