From 3d22ed9633eea2a4d067435050448fdf763773a0 Mon Sep 17 00:00:00 2001 From: gwbeip Date: Sun, 1 Feb 2026 22:02:25 +0800 Subject: [PATCH] helix for zsh --- helix/config.toml | 19 +++++++++++++++++++ zsh/alias/helix_alias.sh | 10 ++++++++++ zsh/zshrc | 1 + 3 files changed, 30 insertions(+) create mode 100644 helix/config.toml create mode 100644 zsh/alias/helix_alias.sh diff --git a/helix/config.toml b/helix/config.toml new file mode 100644 index 0000000..78de520 --- /dev/null +++ b/helix/config.toml @@ -0,0 +1,19 @@ +theme = "onedark" + +[editor] +line-number = "relative" +cursorline = true +cursorcolumn = true +default-yank-register = "+" +continue-comments = true + +[editor.statusline] +left = ["mode", "spinner", "read-only-indicator", "file-modification-indicator", "version-control"] +center = ["file-name", "total-line-numbers", "position-percentage"] +right = ["diagnostics", "selections", "position", "file-encoding", "file-line-ending", "file-type"] +separator = "│" +mode.normal = "NORMAL" +mode.insert = "INSERT" +mode.select = "SELECT" +diagnostics = ["warning", "error"] +workspace-diagnostics = ["warning", "error"] diff --git a/zsh/alias/helix_alias.sh b/zsh/alias/helix_alias.sh new file mode 100644 index 0000000..5113d8e --- /dev/null +++ b/zsh/alias/helix_alias.sh @@ -0,0 +1,10 @@ +if (( $+commands[helix] )); then + alias helix="helix -c $ZSH_POLYJUICE_HELIX_CONFIG_FILE" + alias hx="helix -c $ZSH_POLYJUICE_HELIX_CONFIG_FILE" +elif (( $+commands[hx] )); then + alias helix="hx -c $zsh_polyjuice_helix_config_file" + alias hx="hx -c $zsh_polyjuice_helix_config_file" +else + alias helix="echo HELIX is not installed" + alias hx="echo HELIX/HX is not installed" +fi diff --git a/zsh/zshrc b/zsh/zshrc index 04271c2..22d9a1e 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -21,6 +21,7 @@ export ZSH_POLYJUICE_ALIAS_PATH="$ZSH_POLYJUICE_PATH/alias" export ZSH_POLYJUICE_SETTINGS_PATH="$ZSH_POLYJUICE_PATH/settings" export ZSH_POLYJUICE_FUNCTIONS_PATH="$ZSH_POLYJUICE_PATH/functions" export ZSH_POLYJUICE_STARSHIP_CONFIG_FILE="$ZSH_POLYJUICE_PATH/../starship/starship_default.toml" +export ZSH_POLYJUICE_HELIX_CONFIG_FILE="$ZSH_POLYJUICE_PATH/../helix/config.toml" # Load basic settings `zsh/settings` for _file in "$ZSH_POLYJUICE_SETTINGS_PATH"/*.sh; do