Vscode-gitlens: How to disable inline author link?

Created on 20 Mar 2017  路  15Comments  路  Source: eamodio/vscode-gitlens

Awesome extensions! Love the git blame view 馃憤

There is one minor thing where I'm unsure if I simply use the wrong setting or so. I'd like to disable the author link here:

screen shot 2017-03-20 at 10 49 26

According to the docs the setting gitlens.codeLens.authors.enabled should do the trick, but the author info still remains visible.

question

Most helpful comment

The "gitlens.blame.line.enabled" setting is now called "gitlens.currentLine.enabled".

All 15 comments

@marvinhagemeister GitLens provides 2 CodeLens options -- the most recent commit (which you are seeing above) and the author (of the block) -- but it only shows the author if there is more than 1 author of the block (since it is duplicate information in that case). If you want to turn off all the CodeLens set "gitlens.codeLens.visibility": "ondemand" or "gitlens.codeLens.visibility": "off", or if you just want to turn off the recent commit one set "gitlens.codeLens.recentChange.enabled": false.

Hope that helps.

@eamodio Awesome, that does the job! Thanks for the quick reply 馃憤

Sorry if this is found somewhere else. I have looked, and haven't came across it yet. This is as close as I have found to what I was looking for (the git related messages injecting themselves into my files).

While I understand the reasoning and how they can be useful, I personally want them off. Just leave me to my normal, un-injected/hijacked, code. If I need the features, I will toggle them on myself.

It seems it takes 3 settings to turn these off. There should be one global one, like "hijack.files": true/false.

For anyone stumbling across this, and you want them all off like me, add these to your settings:

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

If there is one single setting, or an easier way, please point me to where it is documented at in this repo.

To add to previous comment:

"gitlens.statusBar.enabled": false,

This will disable gitlens in statusbar.

The "gitlens.blame.line.enabled" setting is now called "gitlens.currentLine.enabled".

Please don't forget to check out the new WYSIWYG settings editor in GitLens 8. It makes it simple to configure these GitLens settings. You can open it from the Command Palette — GitLens: Open Settings

This worked for me - seems keys change a lot in this extension:

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

Recommendation, put a important banner note or something regarding how to accomplish this in the docs. The extension is GREAT but many devs would feel ugly that an extension add popups and text along the source code. I had to disable because of that and because is hard to disable this behavior. Also, define a very explicit key that accomplish this, like "git.codelens.doNotMessWithMySourceCodeEditor"

@cancerberoSgx fyi, you don't need to dig through the settings -- you can just use the built-in GitLens settings editor by running GitLens: Open Settings and it will show you exactly what most of the GitLens settings will do.

Also this is the simplest set to turn those off

    "gitlens.codeLens.enabled": false,
    "gitlens.currentLine.enabled": false,

or in the latest version you can set

    "gitlens.mode.active": "zen"

To enter Zen mode, which won't add anything to the editor (and hides explorer views as well, but that can be configured)

aja thanks! didn't knew about gitlens own's settings.

Thanks for introducing the zen mode, seems to be working so far. I think what we need is status bar icon that can enable/disable gitlens (maybe even a shortcut). Git Lens is useful but only when you are looking for its help, in other cases it is really distracting.

Zen mode (or any custom mode) does add an item in the status bar which you can use to toggle in and out of any mode.

  "editor.codeLens": false,
  "gitlens.codeLens.enabled": false,
  "gitlens.codeLens.recentChange.enabled": false,
  "gitlens.codeLens.authors.enabled": false,
  "gitlens.currentLine.enabled": false,

none of them helps, inline message within editor is still visible,..

@webia1 Can you provide a screenshot of what you mean?

"gitlens.codeLens.enabled": false will turn off the GitLens code lens
"gitlens.currentLine.enabled": false will turn off the GitLens inline blame

You can also just use the built-in GitLens settings editor by running _GitLens: Open Settings_ from the command palette and it will show you exactly what most of the GitLens settings will do.

Also if you are using GitLens modes, ensure that you aren't in Review mode using the _GitLens: Switch Mode_ command

@webia1 VS Code 1.36.1 + GitLens 9.9.3 below setting worked perfectly

{
    "window.zoomLevel": 2,
    "editor.fontSize": 10,
    "workbench.colorTheme": "Visual Studio Light",
    "liveServer.settings.donotShowInfoMsg": true,
    "gitlens.codeLens.recentChange.enabled": false,
    "gitlens.codeLens.authors.enabled": false,
    "gitlens.codeLens.enabled": false,
    "gitlens.currentLine.enabled": false
}

VSCode > Extensions > GitLens > Click Manage Icon ( bottom right wheel ) > Configure Extension
settings > Click "Edit in settings.json" link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mindpivot picture mindpivot  路  4Comments

JP-Ellis picture JP-Ellis  路  3Comments

isaacwashere picture isaacwashere  路  3Comments

Ardeshir81 picture Ardeshir81  路  3Comments

ahhmarr picture ahhmarr  路  3Comments