2023-05-25 06:07:13 +02:00
|
|
|
"install-helix" =program-name
|
|
|
|
|
|
|
|
func main { mega | pop
|
|
|
|
|
|
|
|
"Do you want to add the language to helix and reload? (Is this your first time running this script?) (yes/no)\n> " print
|
|
|
|
readln "yes" eq if {
|
|
|
|
[ "sh" "-c" "cat helix-languages.toml >> $HOME/.config/helix/languages.toml" ] command-wait;
|
|
|
|
}
|
|
|
|
|
|
|
|
"What is your helix binary? (hx/helix/...)\n> " print
|
|
|
|
def hx readln =hx
|
|
|
|
hx "" eq if { "hx" =hx }
|
2023-05-25 06:24:32 +02:00
|
|
|
[ "sh" "-c" "mkdir -p $HOME/.config/helix/runtime/queries/spl && cp queries/* $HOME/.config/helix/runtime/queries/spl/" ] command-wait;
|
|
|
|
[ "sh" "-c" "rm -rf $HOME/.config/helix/runtime/grammars/sources/spl" ] command-wait;
|
2023-05-25 06:07:13 +02:00
|
|
|
[ hx "-g" "fetch" ] command-wait;
|
|
|
|
[ hx "-g" "build" ] command-wait;
|
|
|
|
|
|
|
|
0
|
|
|
|
}
|