Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>IgnoreLensNew to Visual Studio Code? Get it now.
IgnoreLens

IgnoreLens

Jason Gordon

|
120 installs
| (0) | Free
Highlights how many files each ignore line matches and flags those hitting zero for easy identification.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

IgnoreLens

A VS Code extension that shows how many files each ignore line matches and highlights redundant lines.

It tracks a running count of ignored files (the number in brackets). Normal lines add to this count, while negation lines (!) remove from it.

IgnoreLens screenshot

Usage

IgnoreLens activates automatically for its 47 supported file types. The majority of these follow the .gitignore syntax.

To use with any file, change its language mode to ignore via the status bar or command palette (Ctrl+Shift+P → "Change Language Mode").

Match Counts

IgnoreLens decorates each line depending upon how it affects the running count of workspace files.

Symbol Meaning
+N Files added to running count
−N Files removed from running count
(N) Running count total
≡N Already counted (shadowed by earlier line)
∅N Not in count (no matches)
✗N Blocked by parent directory

Counts are colour-coded:

  • Green: Line is adding files
  • Yellow: Negation line, or shadowed line (files already ignored by earlier line)
  • Red: Redundant line (matches nothing)

Real-time Updates

Decorations update automatically when you edit the file or when workspace files change.

Supported Files

IgnoreLens supports 47 ignore file formats with accurate semantics:

Gitignore-Compliant Formats (38)

Standard gitignore rules apply:

  • * matches anything except /, ** matches any path including /, ? matches single character
  • *.ext matches at any depth (basename matching)
  • dir/ directory pattern, blocks negations for files inside
  • !pattern negation (un-ignore), # comment
  • Trims trailing spaces only (tabs preserved)
File Tool/Platform Docs
Version Control
.gitignore Git gitignore
AI Coding Tools
.aiderignore Aider aider
.aiexclude Gemini Code Assist aiexclude
.aiignore JetBrains AI AI Assistant
.augmentignore Augment Code augmentcode
.clineignore Cline cline
.codeiumignore Windsurf/Codeium windsurf
.cursorignore Cursor cursor
.geminiignore Gemini CLI gemini-ignore
.tabnineignore Tabnine tabnine
Build & Package
.bazelignore Bazel (build system) bazelrc
.distignore WordPress CLI dist-archive
.helmignore Helm (Kubernetes) helm ignore
.swagger-codegen-ignore Swagger Codegen swagger codegen
.yarnignore Yarn yarn pack
Cloud & Deployment
.cfignore Cloud Foundry deploy guide
.deployignore DeployHQ excluded files
.ebignore AWS Elastic Beanstalk EB CLI config
.slugignore Heroku slug compiler
.terraformignore Terraform cloud settings
.upignore Up (serverless) apex/up
.vercelignore Vercel vercel ignore
Code Formatters
.prettierignore Prettier ignoring code
Frameworks
.eleventyignore Eleventy (SSG) ignores
.nodemonignore nodemon nodemon
.nuxtignore Nuxt nuxtignore
Linters
.alexignore alex (writing linter) alex
.eslintignore ESLint ignore config
.jshintignore JSHint CLI options
.markdownlintignore markdownlint markdownlint
.solhintignore Solhint (Solidity) solhint
.stylelintignore Stylelint ignore code
.stylintignore Stylint stylint
Misc.
.flooignore Floobits floobits-sublime
.ignore ripgrep/fd/etc ripgrep
.jpmignore Mozilla Jetpack jpm
.rgignore ripgrep ripgrep
.tokeignore Tokei (code stats) tokei

Other Supported Formats (9)

File Tool/Platform Notes Docs
.bzrignore Bazaar (VCS) ! is literal controlling registration
.chefignore Chef (config mgmt) ! is literal chef repo
.cvsignore CVS (VCS) No # comments, ! is literal cvsignore
.dockerignore Docker Leading / stripped build context
.gcloudignore Google Cloud *.ext root only gcloudignore
.npmignore npm *.ext root only npm developers
.p4ignore Perforce (VCS) *.ext root only (first-match-wins) P4IGNORE
.tfignore Team Foundation (VCS) \ anchors to root, no dir blocking TFVC ignore
.vscodeignore VS Code Extension API *.ext root only, trims all whitespace publishing extensions

Configuration

Access settings via File → Preferences → Settings (or Ctrl+,) and search for "ignorelens".

Setting Description Default
ignorelens.enabled Enable or disable decorations true
ignorelens.decorationStyle How to highlight redundant lines: none, background, text, or both text
ignorelens.showMatchCount Show match counts after each line true
ignorelens.scanDebounceMs Delay before rescanning after changes (ms) 500
ignorelens.debug Enable debug logging to Output panel false

Customising Colours

Add to your settings.json:

{
  "workbench.colorCustomizations": {
    "ignorelens.noMatchForeground": "#f14c4c",         // Red text for redundant lines
    "ignorelens.noMatchBackground": "#4a1a1a40",       // Red background for redundant lines
    "ignorelens.matchCountForeground": "#6A9955",      // Green text for matching lines
    "ignorelens.negationForeground": "#CCAA00",        // Yellow text for negation lines
    "ignorelens.staleMatchCountForeground": "#3d5c30", // Stale: darker green
    "ignorelens.staleNoMatchForeground": "#8b2020",    // Stale: darker red
    "ignorelens.staleNoMatchBackground": "#2a0a0a40",  // Stale: darker red background
    "ignorelens.staleNegationForeground": "#7a6600"    // Stale: darker yellow
  }
}

The stale colours are shown briefly when switching tabs while cached data refreshes.

Limitations / Notes

  • Each file is analysed independently. IgnoreLens doesn't consider how multiple ignore files interact. For example, ripgrep allows .rgignore to override .gitignore rules, but IgnoreLens shows each file's matches in isolation.

  • Empty directories are not detected. Directories are discovered by scanning files, so lines targeting empty directories will show zero matches even if the directory exists.

  • Hidden files are included in counts. Files with the hidden attribute (Windows), hidden flag (macOS), or starting with . (Linux/Unix) are counted like regular files.

Technology Stack

  • Language: TypeScript 5.3.0+
  • Framework: VS Code Extension API (1.85.0+)
  • Key Libraries:
    • ignore (5.3.0+) - Gitignore pattern matching
    • minimatch (10.1.1) - Glob pattern matching for vscodeignore

Acknowledgements

Developed with assistance from:

  • Claude Code (Opus 4.5)
  • OpenAI Codex (GPT-5.1-Codex-Max & GPT-5.2-Codex-Max)

Thanks to:

  • GitSparTV for identifying the running count tracking issue.
  • RedCMD for identifying the [a].ts wildcard and trailing tab issues.

Licence

MIT License - Copyright (c) 2025 Jason Gordon

Free to use, modify, and distribute. See LICENSE for details.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft