humkins
humkins

Reputation: 10705

Disable annoying source code modification indication (codelenses and text decorations)

I don't know what the correct name is for the issue I am having, or whether it is related to my VSCode, or some of its extensions.

Here is a screenshot depicting the problem:

enter image description here

Linux, VSCode 1.19.2

Upvotes: 176

Views: 38897

Answers (15)

obatabba
obatabba

Reputation: 1

Just disable Code Lens and Current Line in vscode settings😉.screenshot

Upvotes: 0

strikerdude10
strikerdude10

Reputation: 683

Just did this in October 2024.

Open up settings, search for "gutter"

SCM: Diff Decorations -> set to none

or

SCM: Diff Decorations Gutter Visibility -> set to hover

Upvotes: 0

sheikhsalman08
sheikhsalman08

Reputation: 424

Turn off Inline Blame, and reactive it when requires.

enter image description here

-Short code

Type "Ctrl+Shift+p"

Find the option "GitLens:open settings"

Upvotes: 3

Karol Selak
Karol Selak

Reputation: 4804

June 2023 review:

(GitLens v14.0.1, VSCode v1.79.0)

Ctrl+Shift+P -> GitLens: Open Settings. Then find "Current Line Blame" and "Git Code Lens" headers. Just deselect big checkboxes located at them:

enter image description here

enter image description here

Upvotes: 52

1.21 gigawatts
1.21 gigawatts

Reputation: 17880

If you are not using GitLens and you are using GitHistoryDiff it has a setting, "Show git blame information for each line". Uncheck that option.

enter image description here

Upvotes: 0

Paul-Sebastian Manole
Paul-Sebastian Manole

Reputation: 2700

I think this is what most people want to achieve. Add these settings to the vscode user preferences:

{
  "gitlens.currentLine.enabled": false,
  "gitlens.codeLens.authors.enabled": false,
  "gitlens.codeLens.recentChange.enabled": false
}

Before:

enter image description here

After:

enter image description here

Upvotes: 2

Hosserin Ibrahim
Hosserin Ibrahim

Reputation: 224

Answer for 2022

Ctrl + Shift + P and write Open Setting then Ctrl + F search for Current Line Blame turn it off.

Upvotes: 3

KP Singh
KP Singh

Reputation: 394

As of 1st Jan, 2022:

Go to settings and search for "current line blame". Then uncheck the option that says Gitlens>Current Line>Enabled

Upvotes: 3

KAIXENIX
KAIXENIX

Reputation: 1

Windows 10 VSCode 1.63.2 2022 Git> Decorations: Enabled Solves the problem

Image of vscode settings

Upvotes: 0

SmallChess
SmallChess

Reputation: 8156

2021 recent Visual Code. "Current Line Blame" is the one you should be looking for.

enter image description here

Upvotes: 1

Nigel Gilbert
Nigel Gilbert

Reputation: 508

One can now simply add "gitlens.mode.active": "zen" to settings.json with Gitlens version 9.5.1 to disable the annoying in-line features.

Tested with VScode 1.31.1 on Windows and Mac.

Upvotes: 18

Monarch Wadia
Monarch Wadia

Reputation: 4996

Answer for 2019

Ctrl+Shift+P => "Open Settings" Ctrl+F for "Show the authorship code lenses" Deselect the line.

enter image description here

Upvotes: 61

Alex
Alex

Reputation: 67929

"gitlens.blame.line.enabled": false,// was working in previous versions
"gitlens.currentLine.enabled": false,// in modern version
"gitlens.codeLens.authors.enabled": false,
"gitlens.codeLens.recentChange.enabled": false,

Upvotes: 155

Steve Harrison
Steve Harrison

Reputation: 182

The name of the setting that you're looking for is called, Git Code Lens.

As mentioned in previous replies, there are several options available in the User or Workspace Settings Configuration. In more recent versions of VS Code, you can more easily access those settings from the menu.

  • On Windows/Linux - File > Preferences > Settings
  • On macOS - Code > Preferences > Settings

To update this setting for all projects, Navigate under User Settings > Extensions > GitLens. I chose to disable Git Code Lens entirely by deselecting the checkbox for Code Lens: Enabled; however, you may only want to disable certain features or only at the workspace level. I have included a screenshot including some of the settings below.

enter image description here

For additional information on User and Workspace Settings within VS Code: https://code.visualstudio.com/docs/getstarted/settings

Upvotes: 4

meatherly
meatherly

Reputation: 1861

As of version 8.5.6 you can turn it off with:

"gitlens.codeLens.enabled": false

Upvotes: 4

Related Questions