# More fixes to the semantic index's chunking \(\#11376\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 6964302d89084b76eb1b1436f634d3cbcbcfd3de

Requested commit: 6964302d89084b76eb1b1436f634d3cbcbcfd3de

Commit: 6964302d89084b76eb1b1436f634d3cbcbcfd3de

Tree: 4b5a94e5f3c92ee6e3774e34fc1011d029b7e86d

Author: Max Brunsfeld

Committer: GitHub

## Message

```
More fixes to the semantic index's chunking (#11376)

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:

- N/A

---------

Co-authored-by: Marshall <marshall@zed.dev>
```

## Parents

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

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