mirror of
https://github.com/kahole/edamagit.git
synced 2024-09-11 07:15:31 +03:00
add codePath config
This commit is contained in:
parent
3e9d15a4c0
commit
8c2a33ae7a
@ -395,6 +395,11 @@
|
||||
"default": "other-column",
|
||||
"description": "Choose where new buffers will be displayed."
|
||||
},
|
||||
"magit.code-path": {
|
||||
"type": "string",
|
||||
"default": "code",
|
||||
"description": "Choose specific path to execude vscode. code or codium for example. Can also be a specific path like /Users/me/.nix-profile/bin/codium/"
|
||||
},
|
||||
"magit.forge-enabled": {
|
||||
"type": "boolean",
|
||||
"default": false,
|
||||
|
@ -12,6 +12,7 @@ import FilePathUtils from '../utils/filePathUtils';
|
||||
import * as fs from 'fs';
|
||||
import ViewUtils from '../utils/viewUtils';
|
||||
import GitTextUtils from '../utils/gitTextUtils';
|
||||
import { magitConfig } from '../extension';
|
||||
|
||||
const commitMenu = {
|
||||
title: 'Committing',
|
||||
@ -180,6 +181,9 @@ function findCodePath(): string {
|
||||
let isWindows = process.platform === 'win32';
|
||||
let isRemote = !!vscode.env.remoteName;
|
||||
|
||||
if (magitConfig.codePath !== "") {
|
||||
return magitConfig.codePath
|
||||
}
|
||||
let codePath = 'code';
|
||||
if (isCodium && !isDarwin) {
|
||||
codePath = 'codium';
|
||||
|
@ -57,7 +57,8 @@ function loadConfig() {
|
||||
displayBufferSameColumn: workspaceConfig.get('display-buffer-function') === 'same-column',
|
||||
forgeEnabled: workspaceConfig.get('forge-enabled'),
|
||||
hiddenStatusSections: readHiddenStatusSections(workspaceConfig.get('hide-status-sections')),
|
||||
quickSwitchEnabled: workspaceConfig.get('quick-switch-enabled')
|
||||
quickSwitchEnabled: workspaceConfig.get('quick-switch-enabled'),
|
||||
codePath: workspaceConfig.get('code-path')
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user