Turning Helix into an IDE with the help of WezTerm and CLI tools
The following sub-commands to helix-wezterm.sh are available:
blame
Usestig
to open a "Git blame" in a split view for the current linecheck
Runscargo check
in a split windowexlorer
Runsbroot
in left-side pane to open file explorerlazygit
Runslazygit
is split pane.fzf
Runs ripgrep to search through every line in the project. Similar to global_searchhowdoi
Runshowdoi
with clipboard contents in a new split window.open
Usesgh browse
to open the current file and line number on Githubrun
Calls commands in a new split window. See source code details.test
Runs a test on a single function if the cursor is on that line; otherwise, run all tests in the current file.tgpt
Runstgpt
with clipboard contents in new pane.
You can simply download helix wezterm.sh and helix-fzf.sh to ~/.local/bin
and then add this directory to your $PATH
.
$ brew install quantonganh/tap/helix-wezterm
Install via bpkg
$ bpkg install quantonganh/helix-wezterm -g
Ensure that you're using fish shell with the fish_title function. This will allow you to see hx
in the pane title when listing panes using wezterm cli list --format json
:
{
"window_id": 0,
"tab_id": 167,
"pane_id": 350,
"workspace": "default",
"size": {
"rows": 48,
"cols": 175,
"pixel_width": 2975,
"pixel_height": 1776,
"dpi": 144
},
"title": "hx . ~/C/p/helix-wezterm",
Install the requirements:
Add the following into ~/.config/helix/config.toml
:
[keys.normal.space.","]
b = ":sh helix-wezterm.sh blame"
c = ":sh helix-wezterm.sh check"
e = ":sh helix-wezterm.sh explorer"
f = ":sh helix-wezterm.sh fzf"
g = ":sh helix-wezterm.sh lazygit"
o = ":sh helix-wezterm.sh open"
r = ":sh helix-wezterm.sh run"
t = ":sh helix-wezterm.sh test"