Browse Source

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

Renames *.advanced.debug to *.debug
Renames *.output.level to *.outputLevel
main
Eric Amodio 7 years ago
parent
commit
6af753c0ae
4 changed files with 29 additions and 33 deletions
  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 View File

@ -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" "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": { "gitlens.menus.diff.enabled": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
@ -307,16 +312,6 @@
"default": 0, "default": 0,
"description": "Specifies whether status bar git blame output will be cached for larger documents" "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": { "gitlens.advanced.git": {
"type": "string", "type": "string",
"default": null, "default": null,
@ -332,16 +327,6 @@
"default": 200, "default": 200,
"description": "Specifies the maximum number of QuickPick history entries to show" "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": { "gitlens.advanced.quickPick.closeOnFocusOut": {
"type": "boolean", "type": "boolean",
"default": true, "default": true,
@ -352,6 +337,21 @@
"default": false, "default": false,
"description": "Specifies whether or not to toggle whitespace off then showing blame annotations (*may* be required by certain fonts/themes)" "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": { "gitlens.insiders": {
"type": "boolean", "type": "boolean",
"default": false, "default": false,

+ 3
- 7
src/configuration.ts View File

@ -64,6 +64,7 @@ export interface ICodeLensLanguageLocation {
} }
export interface ICodeLensesConfig { export interface ICodeLensesConfig {
debug: boolean;
visibility: CodeLensVisibility; visibility: CodeLensVisibility;
location: CodeLensLocation; location: CodeLensLocation;
locationCustomSymbols: string[]; locationCustomSymbols: string[];
@ -99,18 +100,11 @@ export interface IAdvancedConfig {
maxLines: number; maxLines: number;
} }
}; };
codeLens: {
debug: boolean;
};
debug: boolean;
git: string; git: string;
gitignore: { gitignore: {
enabled: boolean; enabled: boolean;
}; };
maxQuickHistory: number; maxQuickHistory: number;
output: {
level: OutputLevel;
};
quickPick: { quickPick: {
closeOnFocusOut: boolean; closeOnFocusOut: boolean;
}; };
@ -120,6 +114,8 @@ export interface IAdvancedConfig {
} }
export interface IConfig { export interface IConfig {
debug: boolean;
outputLevel: OutputLevel;
blame: IBlameConfig; blame: IBlameConfig;
codeLens: ICodeLensesConfig; codeLens: ICodeLensesConfig;
statusBar: IStatusBarConfig; statusBar: IStatusBarConfig;

+ 2
- 2
src/gitCodeLensProvider.ts View File

@ -261,7 +261,7 @@ export class GitCodeLensProvider implements CodeLensProvider {
const recentCommit = Iterables.first(blame.commits.values()); const recentCommit = Iterables.first(blame.commits.values());
title = `${recentCommit.author}, ${moment(recentCommit.date).fromNow()}`; 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})]`; 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 blame = lens.getBlame();
const count = blame.authors.size; const count = blame.authors.size;
let title = `${count} ${count > 1 ? 'authors' : 'author'} (${Iterables.first(blame.authors.values()).name}${count > 1 ? ' and others' : ''})`; 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), ', ')})]`; 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 View File

@ -1,6 +1,6 @@
'use strict'; 'use strict';
import { ExtensionContext, OutputChannel, window, workspace } from 'vscode'; import { ExtensionContext, OutputChannel, window, workspace } from 'vscode';
import { IAdvancedConfig } from './configuration';
import { IConfig } from './configuration';
import { ExtensionKey } from './constants'; import { ExtensionKey } from './constants';
import { Telemetry } from './telemetry'; import { Telemetry } from './telemetry';
@ -19,11 +19,11 @@ let level: OutputLevel = OutputLevel.Silent;
let output: OutputChannel; let output: OutputChannel;
function onConfigurationChanged() { 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; debug = cfg.debug;
level = cfg.output.level;
level = cfg.outputLevel;
if (level === OutputLevel.Silent) { if (level === OutputLevel.Silent) {
output && output.dispose(); output && output.dispose();

Loading…
Cancel
Save