Forráskód Böngészése

disable helix grammar build for gitcommit, symlink helix runtime4

chach 2 hete
szülő
commit
fb7c66528f
1 módosított fájl, 8 hozzáadás és 1 törlés
  1. 8 1
      02-helix.sh

+ 8 - 1
02-helix.sh

@@ -5,9 +5,16 @@ rm -rf "$DIR"
 git clone --depth=1 https://github.com/helix-editor/helix "$DIR"
 
 pushd "$DIR"
-export HELIX_DISABLE_AUTO_GRAMMAR_BUILD="1"
+
+# 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"
+