Skip to content

Feature Request: Temporary Disable Error Lens #262

@claudiospizzi

Description

@claudiospizzi

Problem/Use Case

I have Error Lens enabled globally in my user settings, which is great for my regular development work. However, there are times when I want to temporarily disable it for the current VS Code session For example when viewing or editing random files that aren't part of my primary projects. They could have wrong spelling, bad formatting, etc.

Currently, the only way I can find is to disable Error Lens is to toggle errorLens.enabled in the settings using the command Error Lens: Toggle. There is no way to disable it temporarly.

Possible Solution 1: Temporary Toggle Command

Implement a command like Error Lens: Toggle for Session to disable ErrorLens for the current VS Code session. For every other opened VS Code session or any new window, they will not be affected.

Possible Solution 2: Workspace-Only Mode

An option/setting to have ErrorLens only enabled in VS Code if a workspace (folder) is opened. This would disable it for all ad-hoc opened files where VS Code is not in workspace mode.

Benefits

  • Quick temporary disable without losing/changing (synced) global configuration
  • Better workflow for ad-hoc file viewing/editing
  • No need to remember to re-enable after temporary use
  • Cleaner separation between persistent preferences and temporary states

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions