Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion completions/leaf.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion completions/leaf.fish
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion completions/leaf.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions completions/leaf.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -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]'
Expand Down
2 changes: 1 addition & 1 deletion config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
2 changes: 1 addition & 1 deletion src/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
6 changes: 3 additions & 3 deletions src/tests/editor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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");
}
Loading