zed-industries / zed

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
https://zed.dev
Other
34.47k stars 1.71k forks source link

More fixes to the semantic index's chunking #11376

Closed maxbrunsfeld closed 2 weeks ago

maxbrunsfeld commented 2 weeks ago

This fixes a tricky intermittent issue I was seeing, where failed to chunk certain files correctly because of the way we reuse Tree-sitter Parser instances across parses.

I've also accounted for leading comments in chunk boundaries, so that items are grouped with their leading comments whenever possible when chunking.

Finally, we've changed the debug project index action so that it opens a simple debug view in a pane, instead of printing paths to the console. This lets you click into a path and see how it was chunked.

Release Notes: