diff --git a/completions/leaf.bash b/completions/leaf.bash index bd437b7..b0ba0b0 100644 --- a/completions/leaf.bash +++ b/completions/leaf.bash @@ -9,7 +9,7 @@ _leaf() { return ;; --editor|-e) - COMPREPLY=($(compgen -W "nano vim vi nvim micro helix emacs jed code codium subl gedit kate mousepad zed xjed notepad notepad++" -- "$cur")) + COMPREPLY=($(compgen -W "nano vim vi nvim micro hx emacs jed code codium subl gedit kate mousepad zed xjed notepad notepad++" -- "$cur")) return ;; --inline) diff --git a/completions/leaf.fish b/completions/leaf.fish index 75efcc4..1008f43 100644 --- a/completions/leaf.fish +++ b/completions/leaf.fish @@ -2,7 +2,7 @@ complete -c leaf -s h -l help -d "Show help message and exit" complete -c leaf -s V -l version -d "Show version information and exit" complete -c leaf -s w -l watch -d "Watch file for changes and reload" complete -c leaf -l theme -x -a "arctic forest ocean-dark solarized-dark" -d "Set color theme preset" -complete -c leaf -s e -l editor -x -a "nano vim vi nvim micro helix emacs jed code codium subl gedit kate mousepad zed xjed notepad notepad++" -d "Set external editor" +complete -c leaf -s e -l editor -x -a "nano vim vi nvim micro hx emacs jed code codium subl gedit kate mousepad zed xjed notepad notepad++" -d "Set external editor" complete -c leaf -l inline -x -a "ansi plain" -d "Render to stdout (no TUI)" complete -c leaf -l width -x -d "Set maximum content width (min: 20)" complete -c leaf -l picker -d "Open the file browser picker" diff --git a/completions/leaf.ps1 b/completions/leaf.ps1 index 546cb53..d2238f5 100644 --- a/completions/leaf.ps1 +++ b/completions/leaf.ps1 @@ -19,7 +19,7 @@ $global:LeafCompleter = { return } { $_ -in '--editor', '-e' } { - @('nano', 'vim', 'vi', 'nvim', 'micro', 'helix', 'emacs', 'jed', + @('nano', 'vim', 'vi', 'nvim', 'micro', 'hx', 'emacs', 'jed', 'code', 'codium', 'subl', 'gedit', 'kate', 'mousepad', 'zed', 'xjed', 'notepad', 'notepad++') | Where-Object { $_ -like "$wordToComplete*" } | ForEach-Object { diff --git a/completions/leaf.zsh b/completions/leaf.zsh index def93dc..366df1c 100644 --- a/completions/leaf.zsh +++ b/completions/leaf.zsh @@ -11,8 +11,8 @@ _leaf() { '-w[Watch file for changes and reload]' '--watch[Watch file for changes and reload]' '--theme[Set color theme preset]:theme:(arctic forest ocean-dark solarized-dark)' - '-e[Set external editor]:editor:(nano vim vi nvim micro helix emacs jed code codium subl gedit kate mousepad zed xjed notepad notepad++)' - '--editor[Set external editor]:editor:(nano vim vi nvim micro helix emacs jed code codium subl gedit kate mousepad zed xjed notepad notepad++)' + '-e[Set external editor]:editor:(nano vim vi nvim micro hx emacs jed code codium subl gedit kate mousepad zed xjed notepad notepad++)' + '--editor[Set external editor]:editor:(nano vim vi nvim micro hx emacs jed code codium subl gedit kate mousepad zed xjed notepad notepad++)' '--inline[Render to stdout (no TUI)]:format:(ansi plain)' '--width[Set maximum content width (min: 20)]:width:' '--picker[Open the file browser picker]' diff --git a/config.toml b/config.toml index cc6eec3..5edc21c 100644 --- a/config.toml +++ b/config.toml @@ -28,7 +28,7 @@ theme = "ocean" # Default editor for Ctrl+E # Any editor name available in PATH: nano, vim, nvim, micro, -# helix, emacs, code, subl, gedit, kate, mousepad, zed, etc. +# hx, emacs, code, subl, gedit, kate, mousepad, zed, etc. # # For paths with spaces, just write the path: # editor = 'C:\Program Files\Notepad++\notepad++.exe' diff --git a/src/editor.rs b/src/editor.rs index 5b2a96f..e69e97a 100644 --- a/src/editor.rs +++ b/src/editor.rs @@ -82,7 +82,7 @@ const KNOWN_EDITORS: &[(&str, EditorKind)] = &[ ("vi", EditorKind::Terminal), ("nvim", EditorKind::Terminal), ("micro", EditorKind::Terminal), - ("helix", EditorKind::Terminal), + ("hx", EditorKind::Terminal), ("emacs", EditorKind::Terminal), ("jed", EditorKind::Terminal), ("code", EditorKind::Gui), diff --git a/src/tests/editor.rs b/src/tests/editor.rs index ac345e0..da5e30a 100644 --- a/src/tests/editor.rs +++ b/src/tests/editor.rs @@ -46,7 +46,7 @@ fn classify_terminal_editors() { assert_eq!(classify("vim"), EditorKind::Terminal); assert_eq!(classify("nvim"), EditorKind::Terminal); assert_eq!(classify("micro"), EditorKind::Terminal); - assert_eq!(classify("helix"), EditorKind::Terminal); + assert_eq!(classify("hx"), EditorKind::Terminal); assert_eq!(classify("emacs"), EditorKind::Terminal); assert_eq!(classify("jed"), EditorKind::Terminal); } @@ -223,6 +223,6 @@ fn resolve_editor_fallback_is_not_empty() { #[test] fn resolve_editor_config_takes_priority_over_fallback() { - let result = resolve_editor(None, Some("helix")); - assert_eq!(result, "helix"); + let result = resolve_editor(None, Some("hx")); + assert_eq!(result, "hx"); }