Turning Helix into an IDE with the help of WezTerm and CLI tools
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./helix-wezterm.sh -h
Usage: ./helix-wezterm.sh <action> [OPTIONS]
Options:
-h, --help Display this help message and exit
Available actions:
- blame: Show blame for the current file and line number
- explorer: Open the file explorer
- generate_tests: Generate Go tests for the current file
- lazygit: Open terminal UI for git commands
- lint: Lint the current file
- mock: Generate mocks
- navi: Open an interactive cheatsheet tool
- open: Open the current file and line number in the web browser
- present: Present the current file
- query: Query database
- run: Run the current file
- slumber: Open a HTTP client
- test: Test the current fileDownload the configuration file, and place it in either $XDG_CONFIG_HOME if set, or $HOME directory.
Customize the file to specify which CLI tool you want to use for each action.
run:
position: bottom
extensions:
go: go run $basedir/*.goThe available values for the position are window, tab, top, bottom, left, right, floating. Please note that, to use floating mode, you have to compile this PR from the source code.
Install the following requirements:
- envsubst
- yq (Ensure that you are using the
yqimplementation written in Golang, not the one written in Python)
Additionally, it's recommended to install the following CLI tools:
- aichat
- bat for file previews
- fish shell
- fzf
- gh
- glow
- gum
- hurl
- lazygit
- lazysql
- mods
- navi
- presenterm
- ripgrep for grep-like searching
- slumber
- tig
- yazi
Add the following into ~/.config/helix/config.toml:
[keys.normal.space.","]
b = ":sh helix-wezterm.sh blame %{buffer_name} %{cursor_line}"
e = ":sh helix-wezterm.sh explorer"
g = ":sh helix-wezterm.sh lazygit"
o = ":sh helix-wezterm.sh open %{buffer_name} %{cursor_line}"
q = ":sh helix-wezterm.sh query"
r = ":sh helix-wezterm.sh run %{buffer_name}"
s = ":sh helix-wezterm.sh slumber"
m = ":sh helix-wezterm.sh mock"
n = ":sh helix-wezterm.sh navi"
p = ":sh helix-wezterm.sh present %{buffer_name}"
t = ":sh helix-wezterm.sh test %{buffer_name}"
[keys.select.";"]
a = ":sh echo '%{selection}' > /tmp/aichat; helix-wezterm.sh ai %{buffer_name}"