Skip to content

Commit

Permalink
Setting differ view via vscode editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
cweijan committed Mar 4, 2024
1 parent 6e31d4a commit 074e37c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import { FileUtil } from './common/fileUtil';
const httpExt = require('./bundle/extension');

export function activate(context: vscode.ExtensionContext) {
keepOriginDiff();
activeHTTP(context)
autoClearCacheStorage();
const viewOption = { webviewOptions: { retainContextWhenHidden: true, enableFindWidget: true } };
Expand Down Expand Up @@ -38,3 +39,14 @@ async function activeHTTP(context: vscode.ExtensionContext) {
Output.debug(error)
}
}

function keepOriginDiff() {
const config = vscode.workspace.getConfiguration("workbench");
const configKey = 'editorAssociations'
const editorAssociations = config.get(configKey)
const key = '{git,gitlens}:/**/*.{md,csv}'
if (!editorAssociations[key]) {
editorAssociations[key] = 'default'
config.update(configKey, editorAssociations)
}
}

0 comments on commit 074e37c

Please sign in to comment.