Adds new CodeLens visibility & location settings

Adds new command to toggle CodeLens on and off when `gitlens.codeLens.visibility` is set to `ondemand`
This commit is contained in:
Eric Amodio
2016-09-19 21:28:52 -04:00
parent 14e9c5b4fa
commit 7b4dd77fbc
9 changed files with 200 additions and 63 deletions

View File

@@ -5,7 +5,7 @@ import GitBlameCodeLensProvider from './gitBlameCodeLensProvider';
import GitBlameContentProvider from './gitBlameContentProvider';
import GitBlameController from './gitBlameController';
import GitProvider, {Git} from './gitProvider';
import {DiffWithPreviousCommand, DiffWithWorkingCommand, ShowBlameCommand, ShowBlameHistoryCommand, ToggleBlameCommand} from './commands';
import {DiffWithPreviousCommand, DiffWithWorkingCommand, ShowBlameCommand, ShowBlameHistoryCommand, ToggleBlameCommand, ToggleCodeLensCommand} from './commands';
import {ICodeLensesConfig} from './configuration';
import {WorkspaceState} from './constants';
@@ -41,6 +41,7 @@ export function activate(context: ExtensionContext) {
context.subscriptions.push(new ShowBlameCommand(git, blameController));
context.subscriptions.push(new ToggleBlameCommand(git, blameController));
context.subscriptions.push(new ShowBlameHistoryCommand(git));
context.subscriptions.push(new ToggleCodeLensCommand(git));
}).catch(reason => console.warn('[GitLens]', reason));
}