Просмотр исходного кода

Renames *.advanced.codeLens.debug to *.codeLens.debug

Renames *.advanced.debug to *.debug
Renames *.output.level to *.outputLevel
main
Eric Amodio 7 лет назад
Родитель
Сommit
6af753c0ae
4 измененных файлов: 29 добавлений и 33 удалений
  1. +20
    -20
      package.json
  2. +3
    -7
      src/configuration.ts
  3. +2
    -2
      src/gitCodeLensProvider.ts
  4. +4
    -4
      src/logger.ts

+ 20
- 20
package.json Просмотреть файл

@ -256,6 +256,11 @@
],
"description": "Specifies the command executed when the authors code lens is clicked. `gitlens.toggleBlame` - toggles blame annotations. `gitlens.showBlameHistory` - opens the blame history explorer. `gitlens.showFileHistory` - opens the file history explorer. `gitlens.diffWithPrevious` - compares the current committed file with the previous commit. `gitlens.showQuickCommitDetails` - shows a commit details quick pick. `gitlens.showQuickCommitFileDetails` - shows a commit file details quick pick. `gitlens.showQuickFileHistory` - shows a file history quick pick. `gitlens.showQuickRepoHistory` - shows a branch history quick pick"
},
"gitlens.codeLens.debug": {
"type": "boolean",
"default": false,
"description": "Specifies whether or not to show debug information in code lens"
},
"gitlens.menus.diff.enabled": {
"type": "boolean",
"default": true,
@ -307,16 +312,6 @@
"default": 0,
"description": "Specifies whether status bar git blame output will be cached for larger documents"
},
"gitlens.advanced.debug": {
"type": "boolean",
"default": false,
"description": "Specifies debug mode"
},
"gitlens.advanced.codeLens.debug": {
"type": "boolean",
"default": false,
"description": "Specifies whether or not to show debug information in code lens"
},
"gitlens.advanced.git": {
"type": "string",
"default": null,
@ -332,16 +327,6 @@
"default": 200,
"description": "Specifies the maximum number of QuickPick history entries to show"
},
"gitlens.advanced.output.level": {
"type": "string",
"default": "silent",
"enum": [
"silent",
"errors",
"verbose"
],
"description": "Specifies how much (if any) output will be sent to the GitLens output channel"
},
"gitlens.advanced.quickPick.closeOnFocusOut": {
"type": "boolean",
"default": true,
@ -352,6 +337,21 @@
"default": false,
"description": "Specifies whether or not to toggle whitespace off then showing blame annotations (*may* be required by certain fonts/themes)"
},
"gitlens.debug": {
"type": "boolean",
"default": false,
"description": "Specifies debug mode"
},
"gitlens.outputLevel": {
"type": "string",
"default": "silent",
"enum": [
"silent",
"errors",
"verbose"
],
"description": "Specifies how much (if any) output will be sent to the GitLens output channel"
},
"gitlens.insiders": {
"type": "boolean",
"default": false,

+ 3
- 7
src/configuration.ts Просмотреть файл

@ -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;

+ 2
- 2
src/gitCodeLensProvider.ts Просмотреть файл

@ -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), ', ')})]`;
}

+ 4
- 4
src/logger.ts Просмотреть файл

@ -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();

Загрузка…
Отмена
Сохранить