Hx support (#16032)

This commit is contained in:
Kevin Jiang
2026-01-06 18:31:38 -08:00
committed by GitHub
parent b54215f0a5
commit 982eee63b6
2 changed files with 33 additions and 2 deletions
+8 -1
View File
@@ -16,7 +16,7 @@ const GUI_EDITORS = [
'zed',
'antigravity',
] as const;
const TERMINAL_EDITORS = ['vim', 'neovim', 'emacs'] as const;
const TERMINAL_EDITORS = ['vim', 'neovim', 'emacs', 'hx'] as const;
const EDITORS = [...GUI_EDITORS, ...TERMINAL_EDITORS] as const;
const GUI_EDITORS_SET = new Set<string>(GUI_EDITORS);
@@ -49,6 +49,7 @@ export const EDITOR_DISPLAY_NAMES: Record<EditorType, string> = {
zed: 'Zed',
emacs: 'Emacs',
antigravity: 'Antigravity',
hx: 'Helix',
};
export function getEditorDisplayName(editor: EditorType): string {
@@ -93,6 +94,7 @@ const editorCommands: Record<
zed: { win32: ['zed'], default: ['zed', 'zeditor'] },
emacs: { win32: ['emacs.exe'], default: ['emacs'] },
antigravity: { win32: ['agy.cmd'], default: ['agy'] },
hx: { win32: ['hx'], default: ['hx'] },
};
export function checkHasEditorType(editor: EditorType): boolean {
@@ -182,6 +184,11 @@ export function getDiffCommand(
command: 'emacs',
args: ['--eval', `(ediff "${oldPath}" "${newPath}")`],
};
case 'hx':
return {
command: 'hx',
args: ['--vsplit', '--', oldPath, newPath],
};
default:
return null;
}