forked from qt-creator/qt-creator
Git: Add instant line annotation (blame)
Inspired by the Visual Studio Code plugin GitLens. Add an annotation to the editor line the cursor is currently in. A tooltip contains the commit data and allows to invoke git show for the commit. When the automatic annotation is turned off, it can still be forced for the current line with an action. The default shortcut for this action is: Alt+G,Alt+I Task-number: QTCREATORBUG-23299 Change-Id: I58eef9efcf531afb11470e5f5456e19f282b18d0 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
This commit is contained in:
committed by
André Hartmann
parent
ea917a0aa6
commit
cae1936da3
@@ -88,6 +88,13 @@ GitSettings::GitSettings()
|
||||
repositoryBrowserCmd.setDisplayName(Tr::tr("Git Repository Browser Command"));
|
||||
repositoryBrowserCmd.setLabelText(Tr::tr("Command:"));
|
||||
|
||||
registerAspect(&instantBlame);
|
||||
instantBlame.setSettingsKey("Git Instant");
|
||||
instantBlame.setDefaultValue(true);
|
||||
instantBlame.setLabelText(Tr::tr("Add instant blame annotations to editor"));
|
||||
instantBlame.setToolTip(Tr::tr("Directly annotate each line in the editor "
|
||||
"when scrolling through the document."));
|
||||
|
||||
registerAspect(&graphLog);
|
||||
graphLog.setSettingsKey("GraphLog");
|
||||
|
||||
@@ -173,6 +180,11 @@ GitSettingsPage::GitSettingsPage(GitSettings *settings)
|
||||
Row { s.repositoryBrowserCmd }
|
||||
},
|
||||
|
||||
Group {
|
||||
title(Tr::tr("Instant Blame")),
|
||||
Row { s.instantBlame }
|
||||
},
|
||||
|
||||
st
|
||||
}.attachTo(widget);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user