From 6c0a7f60eb51e4043a8ae79093500fa0831010d0 Mon Sep 17 00:00:00 2001 From: Poliorcetics Date: Mon, 22 Jul 2024 16:47:27 +0200 Subject: [PATCH] contrib: add nushell completions (#11262) --- contrib/completion/hx.nu | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 contrib/completion/hx.nu diff --git a/contrib/completion/hx.nu b/contrib/completion/hx.nu new file mode 100644 index 000000000..b7bb542c0 --- /dev/null +++ b/contrib/completion/hx.nu @@ -0,0 +1,25 @@ +# Completions for Helix: +# +# NOTE: the `+N` syntax is not supported in Nushell (https://github.com/nushell/nushell/issues/13418) +# so it has not been specified here and will not be proposed in the autocompletion of Nushell. +# The help message won't be overriden though, so it will still be present here + +def health_categories [] { ["all", "clipboard", "languages"] } + +def grammar_categories [] { ["fetch", "build"] } + +# A post-modern text editor. +export extern hx [ + --help(-h), # Prints help information + --tutor, # Loads the tutorial + --health: string@health_categories = "all", # Checks for potential errors in editor setup + --grammar(-g): string@grammar_categories, # Fetches or builds tree-sitter grammars listed in `languages.toml` + --config(-c): glob, # Specifies a file to use for configuration + -v, # Increases logging verbosity each use for up to 3 times + --log: glob, # Specifies a file to use for logging + --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): glob, # Specify an initial working directory + ...files: glob, # Sets the input file to use, position can also be specified via file[:row[:col]] +]