zed/crates/extension
Marshall Bowers 68accaeb00
assistant: Improve /docs argument completions (#13876)
This PR improves the completions for arguments in the `/docs` slash
command.

We achieved this by extending the `complete_argument` method on the
`SlashCommand` trait to return a `Vec<ArgumentCompletion>` instead of a
`Vec<String>`.

In addition to the completion `label`, `ArgumentCompletion` has two new
fields that are can be used to customize the completion behavior:

- `new_text`: The actual text that will be inserted when the completion
is accepted, which may be different from what is shown by the completion
label.
- `run_command`: Whether the command is run when the completion is
accepted. This can be set to `false` to allow accepting a completion
without running the command.

Release Notes:

- N/A

---------

Co-authored-by: Antonio <antonio@zed.dev>
2024-07-05 13:29:17 -04:00
..
src assistant: Improve /docs argument completions (#13876) 2024-07-05 13:29:17 -04:00
Cargo.toml Allow extensions to define providers for indexing docs (#13755) 2024-07-02 19:49:20 -04:00
LICENSE-GPL Add logic for managing language and theme extensions (#7467) 2024-02-07 15:14:50 -05:00