context7 icon indicating copy to clipboard operation
context7 copied to clipboard

Feature Request: Index source codes, too (Why is the Zed repo not indexed completely?)

Open behrangsa opened this issue 10 months ago • 5 comments

Withing the Zed repo, is hidden a full-blown GUI programming library, called GPUI, which Zed itself is built on top of.

Example hello world code here, again inside the same repo.

Some symbols in this API:

use gpui::{
    App, Application, Bounds, Context, SharedString, Window, WindowBounds, WindowOptions, div,
    prelude::*, px, rgb, size,
};

However none of these symbols seem to have been indexed (I searched for WindowBounds).

Is there a reason why the repo is not entirely scanned?

behrangsa avatar Apr 11 '25 13:04 behrangsa

Never mind. I thought you scan the whole repo...

behrangsa avatar Apr 11 '25 14:04 behrangsa

we scan the code snippets inside those files: export const MARKDOWN_FILE_EXTENSIONS = /.(md|mdx|markdown|txt|rst|ipynb)$/;

wdyt? @behrangsa

enesakar avatar Apr 11 '25 16:04 enesakar

Would be great if you could parse Rust files, extract the AST for each file, index the AST, and learn how these undocumented libraries (GPUI for example), work.

In this case, as a massive full blown app (Zed) is in the same repo, which is built on top of GPUI, it should be relatively easier to create a RAG database to help with the so called vibe coding (eg create an RSS feed reader using GPUI).

behrangsa avatar Apr 12 '25 08:04 behrangsa

I see. This is a major feature request. Right now the assumption is the library author has picked the most important code parts and put into docs as examples. But I agree working on source files will have a better coverage.

enesakar avatar Apr 12 '25 13:04 enesakar

started working on this.

enesakar avatar Oct 02 '25 20:10 enesakar

started working on this.

Lezz go!

behrangsa avatar Dec 06 '25 16:12 behrangsa