mirror of
https://github.com/ckaczor/vscode-gitlens.git
synced 2026-01-26 17:25:06 -05:00
Renames *.advanced.codeLens.debug to *.codeLens.debug
Renames *.advanced.debug to *.debug Renames *.output.level to *.outputLevel
This commit is contained in:
@@ -64,6 +64,7 @@ export interface ICodeLensLanguageLocation {
|
||||
}
|
||||
|
||||
export interface ICodeLensesConfig {
|
||||
debug: boolean;
|
||||
visibility: CodeLensVisibility;
|
||||
location: CodeLensLocation;
|
||||
locationCustomSymbols: string[];
|
||||
@@ -99,18 +100,11 @@ export interface IAdvancedConfig {
|
||||
maxLines: number;
|
||||
}
|
||||
};
|
||||
codeLens: {
|
||||
debug: boolean;
|
||||
};
|
||||
debug: boolean;
|
||||
git: string;
|
||||
gitignore: {
|
||||
enabled: boolean;
|
||||
};
|
||||
maxQuickHistory: number;
|
||||
output: {
|
||||
level: OutputLevel;
|
||||
};
|
||||
quickPick: {
|
||||
closeOnFocusOut: boolean;
|
||||
};
|
||||
@@ -120,6 +114,8 @@ export interface IAdvancedConfig {
|
||||
}
|
||||
|
||||
export interface IConfig {
|
||||
debug: boolean;
|
||||
outputLevel: OutputLevel;
|
||||
blame: IBlameConfig;
|
||||
codeLens: ICodeLensesConfig;
|
||||
statusBar: IStatusBarConfig;
|
||||
|
||||
@@ -261,7 +261,7 @@ export class GitCodeLensProvider implements CodeLensProvider {
|
||||
|
||||
const recentCommit = Iterables.first(blame.commits.values());
|
||||
title = `${recentCommit.author}, ${moment(recentCommit.date).fromNow()}`;
|
||||
if (this._config.advanced.codeLens.debug) {
|
||||
if (this._config.codeLens.debug) {
|
||||
title += ` [${SymbolKind[lens.symbolKind]}(${lens.blameRange.start.line + 1}-${lens.blameRange.end.line + 1}), Commit (${recentCommit.shortSha})]`;
|
||||
}
|
||||
|
||||
@@ -282,7 +282,7 @@ export class GitCodeLensProvider implements CodeLensProvider {
|
||||
const blame = lens.getBlame();
|
||||
const count = blame.authors.size;
|
||||
let title = `${count} ${count > 1 ? 'authors' : 'author'} (${Iterables.first(blame.authors.values()).name}${count > 1 ? ' and others' : ''})`;
|
||||
if (this._config.advanced.codeLens.debug) {
|
||||
if (this._config.codeLens.debug) {
|
||||
title += ` [${SymbolKind[lens.symbolKind]}(${lens.blameRange.start.line + 1}-${lens.blameRange.end.line + 1}), Authors (${Iterables.join(Iterables.map(blame.authors.values(), _ => _.name), ', ')})]`;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
'use strict';
|
||||
import { ExtensionContext, OutputChannel, window, workspace } from 'vscode';
|
||||
import { IAdvancedConfig } from './configuration';
|
||||
import { IConfig } from './configuration';
|
||||
import { ExtensionKey } from './constants';
|
||||
import { Telemetry } from './telemetry';
|
||||
|
||||
@@ -19,11 +19,11 @@ let level: OutputLevel = OutputLevel.Silent;
|
||||
let output: OutputChannel;
|
||||
|
||||
function onConfigurationChanged() {
|
||||
const cfg = workspace.getConfiguration(ExtensionKey).get<IAdvancedConfig>('advanced');
|
||||
const cfg = workspace.getConfiguration().get<IConfig>(ExtensionKey);
|
||||
|
||||
if (cfg.debug !== debug || cfg.output.level !== level) {
|
||||
if (cfg.debug !== debug || cfg.outputLevel !== level) {
|
||||
debug = cfg.debug;
|
||||
level = cfg.output.level;
|
||||
level = cfg.outputLevel;
|
||||
|
||||
if (level === OutputLevel.Silent) {
|
||||
output && output.dispose();
|
||||
|
||||
Reference in New Issue
Block a user