| 1234567891011121314151617181920 |
- #!/usr/bin/env bash
- set -e
- DIR="$HOME/.local/src/helix"
- rm -rf "$DIR"
- git clone --depth=1 https://github.com/helix-editor/helix "$DIR"
- pushd "$DIR"
- # gitcommit grammar build hangs during install, so remove its grammar block
- awk '/^\[\[grammar\]\]$/{b=$0; next} b{if(/^$/){if(b!~/gitcommit/)print b"\n"$0; b=""}else{b=b"\n"$0; next}} END{if(b&&b!~/gitcommit/)print b}' languages.toml > l.tmp && mv l.tmp languages.toml
- cargo install --path helix-term --locked
- popd
- # Symlink runtime (grammars, themes) so helix finds them at runtime
- mkdir -p "$HOME/.config/helix"
- ln -sfn "$DIR/runtime" "$HOME/.config/helix/runtime"
|