helix-wezterm
helix-wezterm copied to clipboard
Turning Helix into an IDE with the help of WezTerm and CLI tools
helix-wezterm
Turning Helix into an IDE with the help of WezTerm and CLI tools
Features
The following sub-commands to helix-wezterm.sh are available:
-
blame
Usestig
to open a "Git blame" in a split view for the current line -
check
Runscargo check
in a split window -
exlorer
Runsbroot
in left-side pane to open file explorer -
lazygit
Runslazygit
is split pane. -
fzf
Runs ripgrep to search through every line in the project. Similar to global_search -
howdoi
Runshowdoi
with clipboard contents in a new split window. -
open
Usesgh browse
to open the current file and line number on Github -
run
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.
Installation
You can simply download helix wezterm.sh and helix-fzf.sh to ~/.local/bin
and then add this directory to your $PATH
.
Install via homebrew
$ brew install quantonganh/tap/helix-wezterm
Install via bpkg
$ bpkg install quantonganh/helix-wezterm -g
Usage
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:
{
"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"