include installer for helix
This commit is contained in:
parent
9c3f41d6a4
commit
d5f4319742
2 changed files with 28 additions and 0 deletions
9
helix-languages.toml
Normal file
9
helix-languages.toml
Normal file
|
@ -0,0 +1,9 @@
|
|||
[[language]]
|
||||
name = "spl"
|
||||
scope = "text.spl"
|
||||
file-types = ["spl"]
|
||||
roots = []
|
||||
|
||||
[[grammar]]
|
||||
name = "spl"
|
||||
source = { git = "https://github.com/tudbut/tree-sitter-spl", rev = "main" }
|
19
install-helix.spl
Normal file
19
install-helix.spl
Normal file
|
@ -0,0 +1,19 @@
|
|||
"install-helix" =program-name
|
||||
|
||||
func main { mega | pop
|
||||
[ "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;
|
||||
|
||||
"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 }
|
||||
[ hx "-g" "fetch" ] command-wait;
|
||||
[ hx "-g" "build" ] command-wait;
|
||||
|
||||
0
|
||||
}
|
Loading…
Add table
Reference in a new issue