Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>Unnecessary Code HighlighterNew to Visual Studio Code? Get it now.
Unnecessary Code Highlighter

Unnecessary Code Highlighter

Bruno F. Martins

|
1 install
| (0) | Free
Highlights unnecessary/unused code in the overview ruler, with optional background tint and underline.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Unnecessary Code in Minimap

A Visual Studio Code extension that enhances the visibility of unnecessary and unused code by highlighting it in the overview ruler, with optional visual decorations including background tints and underlines.

Features

  • Overview Ruler Markers: Displays colored markers in the overview ruler to quickly identify unnecessary code sections throughout your file
  • Customizable Accent Color: Choose any hex color to match your theme or personal preference
  • Visual Decorations: Optional visual enhancements including:
    • Wavy underlines on unnecessary code
    • Subtle background tint for better visibility
  • Fully Configurable: All features can be individually enabled or disabled
  • Lightweight: Minimal performance impact, activates only when needed

Extension Editor Demo Extension Gutter Demo

Installation

From VS Code Marketplace (Coming Soon)

  1. Open Visual Studio Code
  2. Go to Extensions (Ctrl+Shift+X)
  3. Search for "Unnecessary Code in Minimap"
  4. Click "Install"

Manual Installation

  1. Download the latest .vsix file from the GitHub releases
  2. Open VS Code and go to Extensions (Ctrl+Shift+X)
  3. Click the three dots menu and select "Install from VSIX..."
  4. Select the downloaded .vsix file

Configuration

This extension provides several configuration options that can be customized in your VS Code settings:

Available Settings

Setting Type Default Description
unnecessaryCodeInMinimap.enabled boolean true Enable or disable the extension
unnecessaryCodeInMinimap.accentColor string "#dd7aab" Color used for markers, underlines, and background tint (hex format)
unnecessaryCodeInMinimap.showInOverviewRuler boolean true Show markers in the overview ruler
unnecessaryCodeInMinimap.showUnderline boolean true Show wavy underlines on unnecessary code
unnecessaryCodeInMinimap.showBackgroundTint boolean true Show subtle background tint on unnecessary code

Example Configuration

To customize the extension, add these settings to your settings.json:

{
  "unnecessaryCodeInMinimap.enabled": true,
  "unnecessaryCodeInMinimap.accentColor": "#ff6b6b",
  "unnecessaryCodeInMinimap.showInOverviewRuler": true,
  "unnecessaryCodeInMinimap.showUnderline": false,
  "unnecessaryCodeInMinimap.showBackgroundTint": true
}

How It Works

The extension automatically detects unnecessary code by monitoring VS Code's built-in diagnostics system. It looks for diagnostics tagged as "unnecessary" (typically provided by language servers like TypeScript, Python, etc.) and overlays visual indicators based on your configuration.

Why Use This Extension?

You might wonder: "Why do I need this when ESLint, TSLint, and other linters already exist?"

The key difference is team workflow impact. In shared projects within companies and large development teams, modifying linter configurations (like .eslintrc files) affects everyone's development environment simultaneously. This can be problematic because:

  • Different preferences: Team members may have different comfort levels with strict linting rules
  • Legacy code: Existing codebases might have thousands of linting violations that can't be fixed immediately
  • Gradual adoption: Teams may want to introduce stricter rules gradually without disrupting current workflows
  • Personal productivity: Individual developers may want enhanced visual feedback without imposing it on others

This extension provides a personal, non-intrusive solution that:

  • Works independently of your project's linter configuration
  • Doesn't require team consensus or configuration changes
  • Provides immediate visual feedback without blocking builds or commits
  • Allows individual developers to customize their experience
  • Complements existing linter rules rather than replacing them

Think of it as a personal visual enhancement layer that works alongside your existing development tools, giving you better awareness of code quality without affecting your teammates' workflows.

Supported Languages

This extension works with any language that provides unnecessary code diagnostics through VS Code's language server protocol, including:

  • TypeScript/JavaScript
  • Python
  • C#
  • Java
  • Go
  • Rust
  • And many others with appropriate language server extensions

Requirements

  • Visual Studio Code version 1.80.0 or higher
  • A language server that provides unnecessary code diagnostics for your target language

Development

Building from Source

  1. Clone this repository
  2. Install dependencies: npm install
  3. Compile TypeScript: npm run compile
  4. Press F5 in VS Code to launch a new Extension Development Host window

Watch Mode

For development with automatic recompilation:

npm run watch

Contributing

Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

License

This project is licensed under a Non-Commercial License - see the LICENSE file for details. Commercial use is prohibited without explicit permission.

Changelog

0.0.1

  • Initial release
  • Overview ruler markers for unnecessary code
  • Configurable accent color
  • Optional underline decorations
  • Optional background tinting
  • Full configuration support

Support

If you encounter any issues or have feature requests, please open an issue on the project's GitHub repository.


Enjoy cleaner code with better visual feedback! ✨

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