@@ -2298,594 +2298,594 @@ fn clear_register(
2300pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
2300pub const TYPABLE_COMMAND_LIST: &[TypableCommand] = &[
2301− TypableCommand {
2301+ TypableCommand {
2302− name: "quit",
2302+ name: "quit",
2303− aliases: &["q"],
2303+ aliases: &["q"],
2304− doc: "Close the current view.",
2304+ doc: "Close the current view.",
2305− fun: quit,
2305+ fun: quit,
2306− signature: CommandSignature::none(),
2306+ signature: CommandSignature::none(),
2308− TypableCommand {
2308+ TypableCommand {
2309− name: "quit!",
2309+ name: "quit!",
2310− aliases: &["q!"],
2310+ aliases: &["q!"],
2311− doc: "Force close the current view, ignoring unsaved changes.",
2311+ doc: "Force close the current view, ignoring unsaved changes.",
2312− fun: force_quit,
2312+ fun: force_quit,
2313− signature: CommandSignature::none(),
2313+ signature: CommandSignature::none(),
2315− TypableCommand {
2315+ TypableCommand {
2316− name: "open",
2316+ name: "open",
2317− aliases: &["o"],
2317+ aliases: &["o"],
2318− doc: "Open a file from disk into the current view.",
2318+ doc: "Open a file from disk into the current view.",
2319− fun: open,
2319+ fun: open,
2320− signature: CommandSignature::all(completers::filename),
2320+ signature: CommandSignature::all(completers::filename),
2322− TypableCommand {
2322+ TypableCommand {
2323− name: "buffer-close",
2323+ name: "buffer-close",
2324− aliases: &["bc", "bclose"],
2324+ aliases: &["bc", "bclose"],
2325− doc: "Close the current buffer.",
2325+ doc: "Close the current buffer.",
2326− fun: buffer_close,
2326+ fun: buffer_close,
2327− signature: CommandSignature::all(completers::buffer),
2327+ signature: CommandSignature::all(completers::buffer),
2329− TypableCommand {
2329+ TypableCommand {
2330− name: "buffer-close!",
2330+ name: "buffer-close!",
2331− aliases: &["bc!", "bclose!"],
2331+ aliases: &["bc!", "bclose!"],
2332− doc: "Close the current buffer forcefully, ignoring unsaved changes.",
2332+ doc: "Close the current buffer forcefully, ignoring unsaved changes.",
2333− fun: force_buffer_close,
2333+ fun: force_buffer_close,
2334− signature: CommandSignature::all(completers::buffer)
2334+ signature: CommandSignature::all(completers::buffer)
2336− TypableCommand {
2336+ TypableCommand {
2337− name: "buffer-close-others",
2337+ name: "buffer-close-others",
2338− aliases: &["bco", "bcloseother"],
2338+ aliases: &["bco", "bcloseother"],
2339− doc: "Close all buffers but the currently focused one.",
2339+ doc: "Close all buffers but the currently focused one.",
2340− fun: buffer_close_others,
2340+ fun: buffer_close_others,
2341− signature: CommandSignature::none(),
2341+ signature: CommandSignature::none(),
2343− TypableCommand {
2343+ TypableCommand {
2344− name: "buffer-close-others!",
2344+ name: "buffer-close-others!",
2345− aliases: &["bco!", "bcloseother!"],
2345+ aliases: &["bco!", "bcloseother!"],
2346− doc: "Force close all buffers but the currently focused one.",
2346+ doc: "Force close all buffers but the currently focused one.",
2347− fun: force_buffer_close_others,
2347+ fun: force_buffer_close_others,
2348− signature: CommandSignature::none(),
2348+ signature: CommandSignature::none(),
2350− TypableCommand {
2350+ TypableCommand {
2351− name: "buffer-close-all",
2351+ name: "buffer-close-all",
2352− aliases: &["bca", "bcloseall"],
2352+ aliases: &["bca", "bcloseall"],
2353− doc: "Close all buffers without quitting.",
2353+ doc: "Close all buffers without quitting.",
2354− fun: buffer_close_all,
2354+ fun: buffer_close_all,
2355− signature: CommandSignature::none(),
2355+ signature: CommandSignature::none(),
2357− TypableCommand {
2357+ TypableCommand {
2358− name: "buffer-close-all!",
2358+ name: "buffer-close-all!",
2359− aliases: &["bca!", "bcloseall!"],
2359+ aliases: &["bca!", "bcloseall!"],
2360− doc: "Force close all buffers ignoring unsaved changes without quitting.",
2360+ doc: "Force close all buffers ignoring unsaved changes without quitting.",
2361− fun: force_buffer_close_all,
2361+ fun: force_buffer_close_all,
2362− signature: CommandSignature::none(),
2362+ signature: CommandSignature::none(),
2364− TypableCommand {
2364+ TypableCommand {
2365− name: "buffer-next",
2365+ name: "buffer-next",
2366− aliases: &["bn", "bnext"],
2366+ aliases: &["bn", "bnext"],
2367− doc: "Goto next buffer.",
2367+ doc: "Goto next buffer.",
2368− fun: buffer_next,
2368+ fun: buffer_next,
2369− signature: CommandSignature::none(),
2369+ signature: CommandSignature::none(),
2371− TypableCommand {
2371+ TypableCommand {
2372− name: "buffer-previous",
2372+ name: "buffer-previous",
2373− aliases: &["bp", "bprev"],
2373+ aliases: &["bp", "bprev"],
2374− doc: "Goto previous buffer.",
2374+ doc: "Goto previous buffer.",
2375− fun: buffer_previous,
2375+ fun: buffer_previous,
2376− signature: CommandSignature::none(),
2376+ signature: CommandSignature::none(),
2378− TypableCommand {
2378+ TypableCommand {
2379− name: "write",
2379+ name: "write",
2380− aliases: &["w"],
2380+ aliases: &["w"],
2381− doc: "Write changes to disk. Accepts an optional path (:write some/path.txt)",
2381+ doc: "Write changes to disk. Accepts an optional path (:write some/path.txt)",
2382− fun: write,
2382+ fun: write,
2383− signature: CommandSignature::positional(&[completers::filename]),
2383+ signature: CommandSignature::positional(&[completers::filename]),
2385− TypableCommand {
2385+ TypableCommand {
2386− name: "write!",
2386+ name: "write!",
2387− aliases: &["w!"],
2387+ aliases: &["w!"],
2388− doc: "Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write! some/path.txt)",
2388+ doc: "Force write changes to disk creating necessary subdirectories. Accepts an optional path (:write! some/path.txt)",
2389− fun: force_write,
2389+ fun: force_write,
2390− signature: CommandSignature::positional(&[completers::filename]),
2390+ signature: CommandSignature::positional(&[completers::filename]),
2392− TypableCommand {
2392+ TypableCommand {
2393− name: "write-buffer-close",
2393+ name: "write-buffer-close",
2394− aliases: &["wbc"],
2394+ aliases: &["wbc"],
2395− doc: "Write changes to disk and closes the buffer. Accepts an optional path (:write-buffer-close some/path.txt)",
2395+ doc: "Write changes to disk and closes the buffer. Accepts an optional path (:write-buffer-close some/path.txt)",
2396− fun: write_buffer_close,
2396+ fun: write_buffer_close,
2397− signature: CommandSignature::positional(&[completers::filename]),
2397+ signature: CommandSignature::positional(&[completers::filename]),
2399− TypableCommand {
2399+ TypableCommand {
2400− name: "write-buffer-close!",
2400+ name: "write-buffer-close!",
2401− aliases: &["wbc!"],
2401+ aliases: &["wbc!"],
2402− doc: "Force write changes to disk creating necessary subdirectories and closes the buffer. Accepts an optional path (:write-buffer-close! some/path.txt)",
2402+ doc: "Force write changes to disk creating necessary subdirectories and closes the buffer. Accepts an optional path (:write-buffer-close! some/path.txt)",
2403− fun: force_write_buffer_close,
2403+ fun: force_write_buffer_close,
2404− signature: CommandSignature::positional(&[completers::filename]),
2404+ signature: CommandSignature::positional(&[completers::filename]),
2406− TypableCommand {
2406+ TypableCommand {
2407− name: "new",
2407+ name: "new",
2408− aliases: &["n"],
2408+ aliases: &["n"],
2409− doc: "Create a new scratch buffer.",
2409+ doc: "Create a new scratch buffer.",
2410− fun: new_file,
2410+ fun: new_file,
2411− // TODO: This seems to complete with a filename, but doesn't use that filename to
2411+ // TODO: This seems to complete with a filename, but doesn't use that filename to
2412− // set the path of the newly created buffer.
2412+ // set the path of the newly created buffer.
2413− signature: CommandSignature::positional(&[completers::filename]),
2413+ signature: CommandSignature::positional(&[completers::filename]),
2415− TypableCommand {
2415+ TypableCommand {
2416− name: "format",
2416+ name: "format",
2417− aliases: &["fmt"],
2417+ aliases: &["fmt"],
2418− doc: "Format the file using the LSP formatter.",
2418+ doc: "Format the file using the LSP formatter.",
2419− fun: format,
2419+ fun: format,
2420− signature: CommandSignature::none(),
2420+ signature: CommandSignature::none(),
2422− TypableCommand {
2422+ TypableCommand {
2423− name: "indent-style",
2423+ name: "indent-style",
2424− aliases: &[],
2424+ aliases: &[],
2425− doc: "Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.)",
2425+ doc: "Set the indentation style for editing. ('t' for tabs or 1-8 for number of spaces.)",
2426− fun: set_indent_style,
2426+ fun: set_indent_style,
2427− signature: CommandSignature::none(),
2427+ signature: CommandSignature::none(),
2429− TypableCommand {
2429+ TypableCommand {
2430− name: "line-ending",
2430+ name: "line-ending",
2431− aliases: &[],
2431+ aliases: &[],
2432− #[cfg(not(feature = "unicode-lines"))]
2432+ #[cfg(not(feature = "unicode-lines"))]
2433− doc: "Set the document's default line ending. Options: crlf, lf.",
2433+ doc: "Set the document's default line ending. Options: crlf, lf.",
2434− #[cfg(feature = "unicode-lines")]
2434+ #[cfg(feature = "unicode-lines")]
2435− doc: "Set the document's default line ending. Options: crlf, lf, cr, ff, nel.",
2435+ doc: "Set the document's default line ending. Options: crlf, lf, cr, ff, nel.",
2436− fun: set_line_ending,
2436+ fun: set_line_ending,
2437− signature: CommandSignature::none(),
2437+ signature: CommandSignature::none(),
2439− TypableCommand {
2439+ TypableCommand {
2440− name: "earlier",
2440+ name: "earlier",
2441− aliases: &["ear"],
2441+ aliases: &["ear"],
2442− doc: "Jump back to an earlier point in edit history. Accepts a number of steps or a time span.",
2442+ doc: "Jump back to an earlier point in edit history. Accepts a number of steps or a time span.",
2443− fun: earlier,
2443+ fun: earlier,
2444− signature: CommandSignature::none(),
2444+ signature: CommandSignature::none(),
2446− TypableCommand {
2446+ TypableCommand {
2447− name: "later",
2447+ name: "later",
2448− aliases: &["lat"],
2448+ aliases: &["lat"],
2449− doc: "Jump to a later point in edit history. Accepts a number of steps or a time span.",
2449+ doc: "Jump to a later point in edit history. Accepts a number of steps or a time span.",
2450− fun: later,
2450+ fun: later,
2451− signature: CommandSignature::none(),
2451+ signature: CommandSignature::none(),
2453− TypableCommand {
2453+ TypableCommand {
2454− name: "write-quit",
2454+ name: "write-quit",
2455− aliases: &["wq", "x"],
2455+ aliases: &["wq", "x"],
2456− doc: "Write changes to disk and close the current view. Accepts an optional path (:wq some/path.txt)",
2456+ doc: "Write changes to disk and close the current view. Accepts an optional path (:wq some/path.txt)",
2457− fun: write_quit,
2457+ fun: write_quit,
2458− signature: CommandSignature::positional(&[completers::filename]),
2458+ signature: CommandSignature::positional(&[completers::filename]),
2460− TypableCommand {
2460+ TypableCommand {
2461− name: "write-quit!",
2461+ name: "write-quit!",
2462− aliases: &["wq!", "x!"],
2462+ aliases: &["wq!", "x!"],
2463− doc: "Write changes to disk and close the current view forcefully. Accepts an optional path (:wq! some/path.txt)",
2463+ doc: "Write changes to disk and close the current view forcefully. Accepts an optional path (:wq! some/path.txt)",
2464− fun: force_write_quit,
2464+ fun: force_write_quit,
2465− signature: CommandSignature::positional(&[completers::filename]),
2465+ signature: CommandSignature::positional(&[completers::filename]),
2467− TypableCommand {
2467+ TypableCommand {
2468− name: "write-all",
2468+ name: "write-all",
2469− aliases: &["wa"],
2469+ aliases: &["wa"],
2470− doc: "Write changes from all buffers to disk.",
2470+ doc: "Write changes from all buffers to disk.",
2471− fun: write_all,
2471+ fun: write_all,
2472− signature: CommandSignature::none(),
2472+ signature: CommandSignature::none(),
2474− TypableCommand {
2474+ TypableCommand {
2475− name: "write-all!",
2475+ name: "write-all!",
2476− aliases: &["wa!"],
2476+ aliases: &["wa!"],
2477− doc: "Forcefully write changes from all buffers to disk creating necessary subdirectories.",
2477+ doc: "Forcefully write changes from all buffers to disk creating necessary subdirectories.",
2478− fun: force_write_all,
2478+ fun: force_write_all,
2479− signature: CommandSignature::none(),
2479+ signature: CommandSignature::none(),
2481− TypableCommand {
2481+ TypableCommand {
2482− name: "write-quit-all",
2482+ name: "write-quit-all",
2483− aliases: &["wqa", "xa"],
2483+ aliases: &["wqa", "xa"],
2484− doc: "Write changes from all buffers to disk and close all views.",
2484+ doc: "Write changes from all buffers to disk and close all views.",
2485− fun: write_all_quit,
2485+ fun: write_all_quit,
2486− signature: CommandSignature::none(),
2486+ signature: CommandSignature::none(),
2488− TypableCommand {
2488+ TypableCommand {
2489− name: "write-quit-all!",
2489+ name: "write-quit-all!",
2490− aliases: &["wqa!", "xa!"],
2490+ aliases: &["wqa!", "xa!"],
2491− doc: "Write changes from all buffers to disk and close all views forcefully (ignoring unsaved changes).",
2491+ doc: "Write changes from all buffers to disk and close all views forcefully (ignoring unsaved changes).",
2492− fun: force_write_all_quit,
2492+ fun: force_write_all_quit,
2493− signature: CommandSignature::none(),
2493+ signature: CommandSignature::none(),
2495− TypableCommand {
2495+ TypableCommand {
2496− name: "quit-all",
2496+ name: "quit-all",
2497− aliases: &["qa"],
2497+ aliases: &["qa"],
2498− doc: "Close all views.",
2498+ doc: "Close all views.",
2499− fun: quit_all,
2499+ fun: quit_all,
2500− signature: CommandSignature::none(),
2500+ signature: CommandSignature::none(),
2502− TypableCommand {
2502+ TypableCommand {
2503− name: "quit-all!",
2503+ name: "quit-all!",
2504− aliases: &["qa!"],
2504+ aliases: &["qa!"],
2505− doc: "Force close all views ignoring unsaved changes.",
2505+ doc: "Force close all views ignoring unsaved changes.",
2506− fun: force_quit_all,
2506+ fun: force_quit_all,
2507− signature: CommandSignature::none(),
2507+ signature: CommandSignature::none(),
2509− TypableCommand {
2509+ TypableCommand {
2510− name: "cquit",
2510+ name: "cquit",
2511− aliases: &["cq"],
2511+ aliases: &["cq"],
2512− doc: "Quit with exit code (default 1). Accepts an optional integer exit code (:cq 2).",
2512+ doc: "Quit with exit code (default 1). Accepts an optional integer exit code (:cq 2).",
2513− fun: cquit,
2513+ fun: cquit,
2514− signature: CommandSignature::none(),
2514+ signature: CommandSignature::none(),
2516− TypableCommand {
2516+ TypableCommand {
2517− name: "cquit!",
2517+ name: "cquit!",
2518− aliases: &["cq!"],
2518+ aliases: &["cq!"],
2519− doc: "Force quit with exit code (default 1) ignoring unsaved changes. Accepts an optional integer exit code (:cq! 2).",
2519+ doc: "Force quit with exit code (default 1) ignoring unsaved changes. Accepts an optional integer exit code (:cq! 2).",
2520− fun: force_cquit,
2520+ fun: force_cquit,
2521− signature: CommandSignature::none(),
2521+ signature: CommandSignature::none(),
2523− TypableCommand {
2523+ TypableCommand {
2524− name: "theme",
2524+ name: "theme",
2525− aliases: &[],
2525+ aliases: &[],
2526− doc: "Change the editor theme (show current theme if no name specified).",
2526+ doc: "Change the editor theme (show current theme if no name specified).",
2527− fun: theme,
2527+ fun: theme,
2528− signature: CommandSignature::positional(&[completers::theme]),
2528+ signature: CommandSignature::positional(&[completers::theme]),
2530− TypableCommand {
2530+ TypableCommand {
2531− name: "yank-join",
2531+ name: "yank-join",
2532− aliases: &[],
2532+ aliases: &[],
2533− doc: "Yank joined selections. A separator can be provided as first argument. Default value is newline.",
2533+ doc: "Yank joined selections. A separator can be provided as first argument. Default value is newline.",
2534− fun: yank_joined,
2534+ fun: yank_joined,
2535− signature: CommandSignature::none(),
2535+ signature: CommandSignature::none(),
2537− TypableCommand {
2537+ TypableCommand {
2538− name: "clipboard-yank",
2538+ name: "clipboard-yank",
2539− aliases: &[],
2539+ aliases: &[],
2540− doc: "Yank main selection into system clipboard.",
2540+ doc: "Yank main selection into system clipboard.",
2541− fun: yank_main_selection_to_clipboard,
2541+ fun: yank_main_selection_to_clipboard,
2542− signature: CommandSignature::none(),
2542+ signature: CommandSignature::none(),
2544− TypableCommand {
2544+ TypableCommand {
2545− name: "clipboard-yank-join",
2545+ name: "clipboard-yank-join",
2546− aliases: &[],
2546+ aliases: &[],
2547− doc: "Yank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline.", // FIXME: current UI can't display long doc.
2547+ doc: "Yank joined selections into system clipboard. A separator can be provided as first argument. Default value is newline.", // FIXME: current UI can't display long doc.
2548− fun: yank_joined_to_clipboard,
2548+ fun: yank_joined_to_clipboard,
2549− signature: CommandSignature::none(),
2549+ signature: CommandSignature::none(),
2551− TypableCommand {
2551+ TypableCommand {
2552− name: "primary-clipboard-yank",
2552+ name: "primary-clipboard-yank",
2553− aliases: &[],
2553+ aliases: &[],
2554− doc: "Yank main selection into system primary clipboard.",
2554+ doc: "Yank main selection into system primary clipboard.",
2555− fun: yank_main_selection_to_primary_clipboard,
2555+ fun: yank_main_selection_to_primary_clipboard,
2556− signature: CommandSignature::none(),
2556+ signature: CommandSignature::none(),
2558− TypableCommand {
2558+ TypableCommand {
2559− name: "primary-clipboard-yank-join",
2559+ name: "primary-clipboard-yank-join",
2560− aliases: &[],
2560+ aliases: &[],
2561− doc: "Yank joined selections into system primary clipboard. A separator can be provided as first argument. Default value is newline.", // FIXME: current UI can't display long doc.
2561+ doc: "Yank joined selections into system primary clipboard. A separator can be provided as first argument. Default value is newline.", // FIXME: current UI can't display long doc.
2562− fun: yank_joined_to_primary_clipboard,
2562+ fun: yank_joined_to_primary_clipboard,
2563− signature: CommandSignature::none(),
2563+ signature: CommandSignature::none(),
2565− TypableCommand {
2565+ TypableCommand {
2566− name: "clipboard-paste-after",
2566+ name: "clipboard-paste-after",
2567− aliases: &[],
2567+ aliases: &[],
2568− doc: "Paste system clipboard after selections.",
2568+ doc: "Paste system clipboard after selections.",
2569− fun: paste_clipboard_after,
2569+ fun: paste_clipboard_after,
2570− signature: CommandSignature::none(),
2570+ signature: CommandSignature::none(),
2572− TypableCommand {
2572+ TypableCommand {
2573− name: "clipboard-paste-before",
2573+ name: "clipboard-paste-before",
2574− aliases: &[],
2574+ aliases: &[],
2575− doc: "Paste system clipboard before selections.",
2575+ doc: "Paste system clipboard before selections.",
2576− fun: paste_clipboard_before,
2576+ fun: paste_clipboard_before,
2577− signature: CommandSignature::none(),
2577+ signature: CommandSignature::none(),
2579− TypableCommand {
2579+ TypableCommand {
2580− name: "clipboard-paste-replace",
2580+ name: "clipboard-paste-replace",
2581− aliases: &[],
2581+ aliases: &[],
2582− doc: "Replace selections with content of system clipboard.",
2582+ doc: "Replace selections with content of system clipboard.",
2583− fun: replace_selections_with_clipboard,
2583+ fun: replace_selections_with_clipboard,
2584− signature: CommandSignature::none(),
2584+ signature: CommandSignature::none(),
2586− TypableCommand {
2586+ TypableCommand {
2587− name: "primary-clipboard-paste-after",
2587+ name: "primary-clipboard-paste-after",
2588− aliases: &[],
2588+ aliases: &[],
2589− doc: "Paste primary clipboard after selections.",
2589+ doc: "Paste primary clipboard after selections.",
2590− fun: paste_primary_clipboard_after,
2590+ fun: paste_primary_clipboard_after,
2591− signature: CommandSignature::none(),
2591+ signature: CommandSignature::none(),
2593− TypableCommand {
2593+ TypableCommand {
2594− name: "primary-clipboard-paste-before",
2594+ name: "primary-clipboard-paste-before",
2595− aliases: &[],
2595+ aliases: &[],
2596− doc: "Paste primary clipboard before selections.",
2596+ doc: "Paste primary clipboard before selections.",
2597− fun: paste_primary_clipboard_before,
2597+ fun: paste_primary_clipboard_before,
2598− signature: CommandSignature::none(),
2598+ signature: CommandSignature::none(),
2600− TypableCommand {
2600+ TypableCommand {
2601− name: "primary-clipboard-paste-replace",
2601+ name: "primary-clipboard-paste-replace",
2602− aliases: &[],
2602+ aliases: &[],
2603− doc: "Replace selections with content of system primary clipboard.",
2603+ doc: "Replace selections with content of system primary clipboard.",
2604− fun: replace_selections_with_primary_clipboard,
2604+ fun: replace_selections_with_primary_clipboard,
2605− signature: CommandSignature::none(),
2605+ signature: CommandSignature::none(),
2607− TypableCommand {
2607+ TypableCommand {
2608− name: "show-clipboard-provider",
2608+ name: "show-clipboard-provider",
2609− aliases: &[],
2609+ aliases: &[],
2610− doc: "Show clipboard provider name in status bar.",
2610+ doc: "Show clipboard provider name in status bar.",
2611− fun: show_clipboard_provider,
2611+ fun: show_clipboard_provider,
2612− signature: CommandSignature::none(),
2612+ signature: CommandSignature::none(),
2614− TypableCommand {
2614+ TypableCommand {
2615− name: "change-current-directory",
2615+ name: "change-current-directory",
2616− aliases: &["cd"],
2616+ aliases: &["cd"],
2617− doc: "Change the current working directory.",
2617+ doc: "Change the current working directory.",
2618− fun: change_current_directory,
2618+ fun: change_current_directory,
2619− signature: CommandSignature::positional(&[completers::directory]),
2619+ signature: CommandSignature::positional(&[completers::directory]),
2621− TypableCommand {
2621+ TypableCommand {
2622− name: "show-directory",
2622+ name: "show-directory",
2623− aliases: &["pwd"],
2623+ aliases: &["pwd"],
2624− doc: "Show the current working directory.",
2624+ doc: "Show the current working directory.",
2625− fun: show_current_directory,
2625+ fun: show_current_directory,
2626− signature: CommandSignature::none(),
2626+ signature: CommandSignature::none(),
2628− TypableCommand {
2628+ TypableCommand {
2629− name: "encoding",
2629+ name: "encoding",
2630− aliases: &[],
2630+ aliases: &[],
2631− doc: "Set encoding. Based on `https://encoding.spec.whatwg.org`.",
2631+ doc: "Set encoding. Based on `https://encoding.spec.whatwg.org`.",
2632− fun: set_encoding,
2632+ fun: set_encoding,
2633− signature: CommandSignature::none(),
2633+ signature: CommandSignature::none(),
2635− TypableCommand {
2635+ TypableCommand {
2636− name: "character-info",
2636+ name: "character-info",
2637− aliases: &["char"],
2637+ aliases: &["char"],
2638− doc: "Get info about the character under the primary cursor.",
2638+ doc: "Get info about the character under the primary cursor.",
2639− fun: get_character_info,
2639+ fun: get_character_info,
2640− signature: CommandSignature::none(),
2640+ signature: CommandSignature::none(),
2642− TypableCommand {
2642+ TypableCommand {
2643− name: "reload",
2643+ name: "reload",
2644− aliases: &["rl"],
2644+ aliases: &["rl"],
2645− doc: "Discard changes and reload from the source file.",
2645+ doc: "Discard changes and reload from the source file.",
2646− fun: reload,
2646+ fun: reload,
2647− signature: CommandSignature::none(),
2647+ signature: CommandSignature::none(),
2649− TypableCommand {
2649+ TypableCommand {
2650− name: "reload-all",
2650+ name: "reload-all",
2651− aliases: &["rla"],
2651+ aliases: &["rla"],
2652− doc: "Discard changes and reload all documents from the source files.",
2652+ doc: "Discard changes and reload all documents from the source files.",
2653− fun: reload_all,
2653+ fun: reload_all,
2654− signature: CommandSignature::none(),
2654+ signature: CommandSignature::none(),
2656− TypableCommand {
2656+ TypableCommand {
2657− name: "update",
2657+ name: "update",
2658− aliases: &["u"],
2658+ aliases: &["u"],
2659− doc: "Write changes only if the file has been modified.",
2659+ doc: "Write changes only if the file has been modified.",
2660− fun: update,
2660+ fun: update,
2661− signature: CommandSignature::none(),
2661+ signature: CommandSignature::none(),
2663− TypableCommand {
2663+ TypableCommand {
2664− name: "lsp-workspace-command",
2664+ name: "lsp-workspace-command",
2665− aliases: &[],
2665+ aliases: &[],
2666− doc: "Open workspace command picker",
2666+ doc: "Open workspace command picker",
2667− fun: lsp_workspace_command,
2667+ fun: lsp_workspace_command,
2668− signature: CommandSignature::positional(&[completers::lsp_workspace_command]),
2668+ signature: CommandSignature::positional(&[completers::lsp_workspace_command]),
2670− TypableCommand {
2670+ TypableCommand {
2671− name: "lsp-restart",
2671+ name: "lsp-restart",
2672− aliases: &[],
2672+ aliases: &[],
2673− doc: "Restarts the language servers used by the current doc",
2673+ doc: "Restarts the language servers used by the current doc",
2674− fun: lsp_restart,
2674+ fun: lsp_restart,
2675− signature: CommandSignature::none(),
2675+ signature: CommandSignature::none(),
2677− TypableCommand {
2677+ TypableCommand {
2678− name: "lsp-stop",
2678+ name: "lsp-stop",
2679− aliases: &[],
2679+ aliases: &[],
2680− doc: "Stops the language servers that are used by the current doc",
2680+ doc: "Stops the language servers that are used by the current doc",
2681− fun: lsp_stop,
2681+ fun: lsp_stop,
2682− signature: CommandSignature::none(),
2682+ signature: CommandSignature::none(),
2684− TypableCommand {
2684+ TypableCommand {
2685− name: "tree-sitter-scopes",
2685+ name: "tree-sitter-scopes",
2686− aliases: &[],
2686+ aliases: &[],
2687− doc: "Display tree sitter scopes, primarily for theming and development.",
2687+ doc: "Display tree sitter scopes, primarily for theming and development.",
2688− fun: tree_sitter_scopes,
2688+ fun: tree_sitter_scopes,
2689− signature: CommandSignature::none(),
2689+ signature: CommandSignature::none(),
2691− TypableCommand {
2691+ TypableCommand {
2692− name: "debug-start",
2692+ name: "debug-start",
2693− aliases: &["dbg"],
2693+ aliases: &["dbg"],
2694− doc: "Start a debug session from a given template with given parameters.",
2694+ doc: "Start a debug session from a given template with given parameters.",
2695− fun: debug_start,
2695+ fun: debug_start,
2696− signature: CommandSignature::none(),
2696+ signature: CommandSignature::none(),
2698− TypableCommand {
2698+ TypableCommand {
2699− name: "debug-remote",
2699+ name: "debug-remote",
2700− aliases: &["dbg-tcp"],
2700+ aliases: &["dbg-tcp"],
2701− doc: "Connect to a debug adapter by TCP address and start a debugging session from a given template with given parameters.",
2701+ doc: "Connect to a debug adapter by TCP address and start a debugging session from a given template with given parameters.",
2702− fun: debug_remote,
2702+ fun: debug_remote,
2703− signature: CommandSignature::none(),
2703+ signature: CommandSignature::none(),
2705− TypableCommand {
2705+ TypableCommand {
2706− name: "debug-eval",
2706+ name: "debug-eval",
2707− aliases: &[],
2707+ aliases: &[],
2708− doc: "Evaluate expression in current debug context.",
2708+ doc: "Evaluate expression in current debug context.",
2709− fun: debug_eval,
2709+ fun: debug_eval,
2710− signature: CommandSignature::none(),
2710+ signature: CommandSignature::none(),
2712− TypableCommand {
2712+ TypableCommand {
2713− name: "vsplit",
2713+ name: "vsplit",
2714− aliases: &["vs"],
2714+ aliases: &["vs"],
2715− doc: "Open the file in a vertical split.",
2715+ doc: "Open the file in a vertical split.",
2716− fun: vsplit,
2716+ fun: vsplit,
2717− signature: CommandSignature::all(completers::filename)
2717+ signature: CommandSignature::all(completers::filename)
2719− TypableCommand {
2719+ TypableCommand {
2720− name: "vsplit-new",
2720+ name: "vsplit-new",
2721− aliases: &["vnew"],
2721+ aliases: &["vnew"],
2722− doc: "Open a scratch buffer in a vertical split.",
2722+ doc: "Open a scratch buffer in a vertical split.",
2723− fun: vsplit_new,
2723+ fun: vsplit_new,
2724− signature: CommandSignature::none(),
2724+ signature: CommandSignature::none(),
2726− TypableCommand {
2726+ TypableCommand {
2727− name: "hsplit",
2727+ name: "hsplit",
2728− aliases: &["hs", "sp"],
2728+ aliases: &["hs", "sp"],
2729− doc: "Open the file in a horizontal split.",
2729+ doc: "Open the file in a horizontal split.",
2730− fun: hsplit,
2730+ fun: hsplit,
2731− signature: CommandSignature::all(completers::filename)
2731+ signature: CommandSignature::all(completers::filename)
2733− TypableCommand {
2733+ TypableCommand {
2734− name: "hsplit-new",
2734+ name: "hsplit-new",
2735− aliases: &["hnew"],
2735+ aliases: &["hnew"],
2736− doc: "Open a scratch buffer in a horizontal split.",
2736+ doc: "Open a scratch buffer in a horizontal split.",
2737− fun: hsplit_new,
2737+ fun: hsplit_new,
2738− signature: CommandSignature::none(),
2738+ signature: CommandSignature::none(),
2740− TypableCommand {
2740+ TypableCommand {
2741− name: "tutor",
2741+ name: "tutor",
2742− aliases: &[],
2742+ aliases: &[],
2743− doc: "Open the tutorial.",
2743+ doc: "Open the tutorial.",
2744− fun: tutor,
2744+ fun: tutor,
2745− signature: CommandSignature::none(),
2745+ signature: CommandSignature::none(),
2747− TypableCommand {
2747+ TypableCommand {
2748− name: "goto",
2748+ name: "goto",
2749− aliases: &["g"],
2749+ aliases: &["g"],
2750− doc: "Goto line number.",
2750+ doc: "Goto line number.",
2751− fun: goto_line_number,
2751+ fun: goto_line_number,
2752− signature: CommandSignature::none(),
2752+ signature: CommandSignature::none(),
2754− TypableCommand {
2754+ TypableCommand {
2755− name: "set-language",
2755+ name: "set-language",
2756− aliases: &["lang"],
2756+ aliases: &["lang"],
2757− doc: "Set the language of current buffer (show current language if no value specified).",
2757+ doc: "Set the language of current buffer (show current language if no value specified).",
2758− fun: language,
2758+ fun: language,
2759− signature: CommandSignature::positional(&[completers::language]),
2759+ signature: CommandSignature::positional(&[completers::language]),
2761− TypableCommand {
2761+ TypableCommand {
2762− name: "set-option",
2762+ name: "set-option",
2763− aliases: &["set"],
2763+ aliases: &["set"],
2764− doc: "Set a config option at runtime.\nFor example to disable smart case search, use `:set search.smart-case false`.",
2764+ doc: "Set a config option at runtime.\nFor example to disable smart case search, use `:set search.smart-case false`.",
2765− fun: set_option,
2765+ fun: set_option,
2766− // TODO: Add support for completion of the options value(s), when appropriate.
2766+ // TODO: Add support for completion of the options value(s), when appropriate.
2767− signature: CommandSignature::positional(&[completers::setting]),
2767+ signature: CommandSignature::positional(&[completers::setting]),
2769− TypableCommand {
2769+ TypableCommand {
2770− name: "toggle-option",
2770+ name: "toggle-option",
2771− aliases: &["toggle"],
2771+ aliases: &["toggle"],
2772− doc: "Toggle a boolean config option at runtime.\nFor example to toggle smart case search, use `:toggle search.smart-case`.",
2772+ doc: "Toggle a boolean config option at runtime.\nFor example to toggle smart case search, use `:toggle search.smart-case`.",
2773− fun: toggle_option,
2773+ fun: toggle_option,
2774− signature: CommandSignature::positional(&[completers::setting]),
2774+ signature: CommandSignature::positional(&[completers::setting]),
2776− TypableCommand {
2776+ TypableCommand {
2777− name: "get-option",
2777+ name: "get-option",
2778− aliases: &["get"],
2778+ aliases: &["get"],
2779− doc: "Get the current value of a config option.",
2779+ doc: "Get the current value of a config option.",
2780− fun: get_option,
2780+ fun: get_option,
2781− signature: CommandSignature::positional(&[completers::setting]),
2781+ signature: CommandSignature::positional(&[completers::setting]),
2783− TypableCommand {
2783+ TypableCommand {
2784− name: "sort",
2784+ name: "sort",
2785− aliases: &[],
2785+ aliases: &[],
2786− doc: "Sort ranges in selection.",
2786+ doc: "Sort ranges in selection.",
2787− fun: sort,
2787+ fun: sort,
2788− signature: CommandSignature::none(),
2788+ signature: CommandSignature::none(),
2790− TypableCommand {
2790+ TypableCommand {
2791− name: "rsort",
2791+ name: "rsort",
2792− aliases: &[],
2792+ aliases: &[],
2793− doc: "Sort ranges in selection in reverse order.",
2793+ doc: "Sort ranges in selection in reverse order.",
2794− fun: sort_reverse,
2794+ fun: sort_reverse,
2795− signature: CommandSignature::none(),
2795+ signature: CommandSignature::none(),
2797− TypableCommand {
2797+ TypableCommand {
2798− name: "reflow",
2798+ name: "reflow",
2799− aliases: &[],
2799+ aliases: &[],
2800− doc: "Hard-wrap the current selection of lines to a given width.",
2800+ doc: "Hard-wrap the current selection of lines to a given width.",
2801− fun: reflow,
2801+ fun: reflow,
2802− signature: CommandSignature::none(),
2802+ signature: CommandSignature::none(),
2804− TypableCommand {
2804+ TypableCommand {
2805− name: "tree-sitter-subtree",
2805+ name: "tree-sitter-subtree",
2806− aliases: &["ts-subtree"],
2806+ aliases: &["ts-subtree"],
2807− doc: "Display tree sitter subtree under cursor, primarily for debugging queries.",
2807+ doc: "Display tree sitter subtree under cursor, primarily for debugging queries.",
2808− fun: tree_sitter_subtree,
2808+ fun: tree_sitter_subtree,
2809− signature: CommandSignature::none(),
2809+ signature: CommandSignature::none(),
2811− TypableCommand {
2811+ TypableCommand {
2812− name: "config-reload",
2812+ name: "config-reload",
2813− aliases: &[],
2813+ aliases: &[],
2814− doc: "Refresh user config.",
2814+ doc: "Refresh user config.",
2815− fun: refresh_config,
2815+ fun: refresh_config,
2816− signature: CommandSignature::none(),
2816+ signature: CommandSignature::none(),
2818− TypableCommand {
2818+ TypableCommand {
2819− name: "config-open",
2819+ name: "config-open",
2820− aliases: &[],
2820+ aliases: &[],
2821− doc: "Open the user config.toml file.",
2821+ doc: "Open the user config.toml file.",
2822− fun: open_config,
2822+ fun: open_config,
2823− signature: CommandSignature::none(),
2823+ signature: CommandSignature::none(),
2825− TypableCommand {
2825+ TypableCommand {
2826− name: "config-open-workspace",
2826+ name: "config-open-workspace",
2827− aliases: &[],
2827+ aliases: &[],
2828− doc: "Open the workspace config.toml file.",
2828+ doc: "Open the workspace config.toml file.",
2829− fun: open_workspace_config,
2829+ fun: open_workspace_config,
2830− signature: CommandSignature::none(),
2830+ signature: CommandSignature::none(),
2832− TypableCommand {
2832+ TypableCommand {
2833− name: "log-open",
2833+ name: "log-open",
2834− aliases: &[],
2834+ aliases: &[],
2835− doc: "Open the helix log file.",
2835+ doc: "Open the helix log file.",
2836− fun: open_log,
2836+ fun: open_log,
2837− signature: CommandSignature::none(),
2837+ signature: CommandSignature::none(),
2839− TypableCommand {
2839+ TypableCommand {
2840− name: "insert-output",
2840+ name: "insert-output",
2841− aliases: &[],
2841+ aliases: &[],
2842− doc: "Run shell command, inserting output before each selection.",
2842+ doc: "Run shell command, inserting output before each selection.",
2843− fun: insert_output,
2843+ fun: insert_output,
2844− signature: CommandSignature::none(),
2844+ signature: CommandSignature::none(),
2846− TypableCommand {
2846+ TypableCommand {
2847− name: "append-output",
2847+ name: "append-output",
2848− aliases: &[],
2848+ aliases: &[],
2849− doc: "Run shell command, appending output after each selection.",
2849+ doc: "Run shell command, appending output after each selection.",
2850− fun: append_output,
2850+ fun: append_output,
2851− signature: CommandSignature::none(),
2851+ signature: CommandSignature::none(),
2853− TypableCommand {
2853+ TypableCommand {
2854− name: "pipe",
2854+ name: "pipe",
2855− aliases: &[],
2855+ aliases: &[],
2856− doc: "Pipe each selection to the shell command.",
2856+ doc: "Pipe each selection to the shell command.",
2857− fun: pipe,
2857+ fun: pipe,
2858− signature: CommandSignature::none(),
2858+ signature: CommandSignature::none(),
2860− TypableCommand {
2860+ TypableCommand {
2861− name: "pipe-to",
2861+ name: "pipe-to",
2862− aliases: &[],
2862+ aliases: &[],
2863− doc: "Pipe each selection to the shell command, ignoring output.",
2863+ doc: "Pipe each selection to the shell command, ignoring output.",
2864− fun: pipe_to,
2864+ fun: pipe_to,
2865− signature: CommandSignature::none(),
2865+ signature: CommandSignature::none(),
2867− TypableCommand {
2867+ TypableCommand {
2868− name: "run-shell-command",
2868+ name: "run-shell-command",
2869− aliases: &["sh"],
2869+ aliases: &["sh"],
2870− doc: "Run a shell command",
2870+ doc: "Run a shell command",
2871− fun: run_shell_command,
2871+ fun: run_shell_command,
2872− signature: CommandSignature::all(completers::filename)
2872+ signature: CommandSignature::all(completers::filename)
2874− TypableCommand {
2874+ TypableCommand {
2875− name: "reset-diff-change",
2875+ name: "reset-diff-change",
2876− aliases: &["diffget", "diffg"],
2876+ aliases: &["diffget", "diffg"],
2877− doc: "Reset the diff change at the cursor position.",
2877+ doc: "Reset the diff change at the cursor position.",
2878− fun: reset_diff_change,
2878+ fun: reset_diff_change,
2879− signature: CommandSignature::none(),
2879+ signature: CommandSignature::none(),
2881− TypableCommand {
2881+ TypableCommand {
2882− name: "clear-register",
2882+ name: "clear-register",
2883− aliases: &[],
2883+ aliases: &[],
2884− doc: "Clear given register. If no argument is provided, clear all registers.",
2884+ doc: "Clear given register. If no argument is provided, clear all registers.",
2885− fun: clear_register,
2885+ fun: clear_register,
2886− signature: CommandSignature::none(),
2886+ signature: CommandSignature::none(),
2890pub static TYPABLE_COMMAND_MAP: Lazy<HashMap<&'static str, &'static TypableCommand>> =
2890pub static TYPABLE_COMMAND_MAP: Lazy<HashMap<&'static str, &'static TypableCommand>> =
2891 Lazy::new(|| {
2891 Lazy::new(|| {