| 1 |
# Completions for Helix: <https://github.com/helix-editor/helix> |
| 2 |
# |
| 3 |
# NOTE: the `+N` syntax is not supported in Nushell (https://github.com/nushell/nushell/issues/13418) |
| 4 |
# so it has not been specified here and will not be proposed in the autocompletion of Nushell. |
| 5 |
# The help message won't be overridden though, so it will still be present here |
| 6 |
|
| 7 |
def health_categories [] { |
| 8 |
let languages = ^hx --health all-languages | detect columns | get Language | where { $in != null } |
| 9 |
let completions = [ "all", "clipboard", "languages", "all-languages" ] | append $languages |
| 10 |
return $completions |
| 11 |
} |
| 12 |
|
| 13 |
def grammar_categories [] { ["fetch", "build"] } |
| 14 |
|
| 15 |
# A post-modern text editor. |
| 16 |
export extern hx [ |
| 17 |
--help(-h), # Prints help information |
| 18 |
--strict, # Bail on error for commands that can fail |
| 19 |
--tutor, # Loads the tutorial |
| 20 |
--health: string@health_categories, # Checks for potential errors in editor setup |
| 21 |
--grammar(-g): string@grammar_categories, # Fetches or builds tree-sitter grammars listed in `languages.toml` |
| 22 |
--config(-c): glob, # Specifies a file to use for configuration |
| 23 |
-v, # Increases logging verbosity each use for up to 3 times |
| 24 |
--log: glob, # Specifies a file to use for logging |
| 25 |
--version(-V), # Prints version information |
| 26 |
--vsplit, # Splits all given files vertically into different windows |
| 27 |
--hsplit, # Splits all given files horizontally into different windows |
| 28 |
--working-dir(-w): glob, # Specify an initial working directory |
| 29 |
...files: glob, # Sets the input file to use, position can also be specified via file[:row[:col]] |
| 30 |
] |