mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-02-13 03:28:35 -05:00
Adds blame information in the statusBar
Add new StatusBar settings -- see **Extension Settings** above for details Renames the `gitlens.codeLens.recentChange.command` & `gitlens.codeLens.authors.command` settings options (to align with command names) Adds new `gitlens.diffWithPrevious` option to the `gitlens.codeLens.recentChange.command` & `gitlens.codeLens.authors.command` settings Fixes Diff with Previous when the selection is uncommited Removes `gitlens.blame.annotation.useCodeActions` setting and behavior
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
'use strict'
|
||||
import {Commands} from './constants';
|
||||
|
||||
export type BlameAnnotationStyle = 'compact' | 'expanded';
|
||||
export const BlameAnnotationStyle = {
|
||||
@@ -12,15 +13,15 @@ export interface IBlameConfig {
|
||||
sha: boolean;
|
||||
author: boolean;
|
||||
date: boolean;
|
||||
useCodeActions: boolean;
|
||||
};
|
||||
}
|
||||
|
||||
export type CodeLensCommand = 'blame.annotate' | 'blame.explorer' | 'git.history';
|
||||
export type CodeLensCommand = 'gitlens.toggleBlame' | 'gitlens.showBlameHistory' | 'gitlens.diffWithPrevious' | 'git.viewFileHistory';
|
||||
export const CodeLensCommand = {
|
||||
BlameAnnotate: 'blame.annotate' as CodeLensCommand,
|
||||
BlameExplorer: 'blame.explorer' as CodeLensCommand,
|
||||
GitHistory: 'git.history' as CodeLensCommand
|
||||
BlameAnnotate: Commands.ToggleBlame as CodeLensCommand,
|
||||
BlameExplorer: Commands.ShowBlameHistory as CodeLensCommand,
|
||||
DiffWithPrevious: Commands.DiffWithPrevious as CodeLensCommand,
|
||||
GitViewHistory: 'git.viewFileHistory' as CodeLensCommand
|
||||
}
|
||||
|
||||
export type CodeLensLocation = 'all' | 'document+containers' | 'document' | 'custom';
|
||||
@@ -51,6 +52,20 @@ export interface ICodeLensesConfig {
|
||||
authors: ICodeLensConfig;
|
||||
}
|
||||
|
||||
export type StatusBarCommand = 'gitlens.toggleBlame' | 'gitlens.showBlameHistory' | 'gitlens.toggleCodeLens' | 'gitlens.diffWithPrevious' | 'git.viewFileHistory';
|
||||
export const StatusBarCommand = {
|
||||
BlameAnnotate: Commands.ToggleBlame as StatusBarCommand,
|
||||
BlameExplorer: Commands.ShowBlameHistory as StatusBarCommand,
|
||||
DiffWithPrevious: Commands.DiffWithPrevious as StatusBarCommand,
|
||||
ToggleCodeLens: Commands.ToggleCodeLens as StatusBarCommand,
|
||||
GitViewHistory: 'git.viewFileHistory' as StatusBarCommand
|
||||
}
|
||||
|
||||
export interface IStatusBarConfig {
|
||||
enabled: boolean;
|
||||
command: StatusBarCommand;
|
||||
}
|
||||
|
||||
export interface IAdvancedConfig {
|
||||
caching: {
|
||||
enabled: boolean
|
||||
@@ -60,5 +75,6 @@ export interface IAdvancedConfig {
|
||||
export interface IConfig {
|
||||
blame: IBlameConfig,
|
||||
codeLens: ICodeLensesConfig,
|
||||
statusBar: IStatusBarConfig,
|
||||
advanced: IAdvancedConfig
|
||||
}
|
||||
Reference in New Issue
Block a user