# assistant: Add MVP for \`/rustdoc\` using indexed docs \(\#12952\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/0ac9af94e0c5a83567ce4ad65d33df837cea3689)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 0ac9af94e0c5a83567ce4ad65d33df837cea3689

Requested commit: 0ac9af94e0c5a83567ce4ad65d33df837cea3689

Commit: 0ac9af94e0c5a83567ce4ad65d33df837cea3689

Tree: 46d323d8144c1ebe09a8273175e3c83748818cd8

Author: Marshall Bowers

Committer: GitHub

## Message

```
assistant: Add MVP for `/rustdoc` using indexed docs (#12952)

This PR adds an MVP of retrieving docs using the `/rustdoc` command from
an indexed set of docs.

To try this out:

1. Build local docs using `cargo doc`
2. Index the docs for the crate you want to search using `/rustdoc
--index <CRATE_NAME>`
    - Note: This may take a while, depending on the size of the crate
3. Search for docs using `/rustdoc my_crate::path::to::item`
    - You should get completions for the available items

Here are some screenshots of it in action:

<img width="640" alt="Screenshot 2024-06-12 at 6 19 20 PM"
src="https://github.com/zed-industries/zed/assets/1486634/6c49bec9-d084-4dcb-a92c-1b4c557ee9ce">

<img width="636" alt="Screenshot 2024-06-12 at 6 52 56 PM"
src="https://github.com/zed-industries/zed/assets/1486634/636a651c-7d02-48dc-b05c-931f33c49f9c">

Release Notes:

- N/A
```

## Parents

- [ec086945fc190d88aa21d2c1bc2159578bbe62d5](https://git.cafe/gitcafe/zed/commit/ec086945fc190d88aa21d2c1bc2159578bbe62d5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/0ac9af94e0c5a83567ce4ad65d33df837cea3689?format=markdown)
