commit 1b3bcf69ccbcc60e46935aac966715fc35c35ba5 from: Dominik Lang date: Tue Mar 12 20:38:06 2024 UTC Add completions for the helix-editor (hx). Note: nushell doesn't support the "+N" optin to open the first given file at line number N. commit - c0ca5c35e6edb51ecb1c104935145b59822daf5e commit + 1b3bcf69ccbcc60e46935aac966715fc35c35ba5 blob - /dev/null blob + a2b3fb54e47ae57949f1f307fcff93a9d2403329 (mode 644) --- /dev/null +++ hx.nu @@ -0,0 +1,23 @@ +def "nu-complete hx grammar" [] { + [fetch build] +} + +def "nu-complete hx health" [] { + hx --health languages | from ssv | where Language !~ '^✘' | get Language | prepend [all clipboard languages] +} + +# The helix-editor +export extern main [ + files?: path # The file paths to open + --help(-h) # Prints help information + --tutor # Loads the tutorial + --health: string@"nu-complete hx health" # Checks for potential erros in editor setup + --grammar(-g): string@"nu-complete hx grammar" # Fetches or builds tree-sitter grammars listed in languages.toml + --config(-c): path # Specifies a file to use for configuration + -v # Increases logging verbosity each use for up to 3 times + --log: path # Specifies a file to use for logging (default file: /home/dal/.cache/helix/helix.log) + --version(-V) # Prints version information + --vsplit # Splits all given files vertically into different windows + --hsplit # Splits all given files horizontally into different windows + --working-dir(-w): path # Specify an initial working directory +]