# Add experimental LSP-based context retrieval system for edit prediction \(\#44036\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 76167109db7b2d899f2e88ffe04a84ca718dca03

Requested commit: 76167109db7b2d899f2e88ffe04a84ca718dca03

Commit: 76167109db7b2d899f2e88ffe04a84ca718dca03

Tree: bc0e63f75101d7e778320977e9f98ae49cbb7cf2

Author: Max Brunsfeld

Committer: GitHub

## Message

```
Add experimental LSP-based context retrieval system for edit prediction (#44036)

To do

* [x] Default to no context retrieval. Allow opting in to LSP-based
retrieval via a setting (for users in `zeta2` feature flag)
* [x] Feed this context to models when enabled
* [x] Make the zeta2 context view work well with LSP retrieval
* [x] Add a UI for the setting (for feature-flagged users)
* [x] Ensure Zeta CLI `context` command is usable

---

* [ ] Filter out LSP definitions that are too large / entire files (e.g.
modules)
* [ ] Introduce timeouts
* [ ] Test with other LSPs
* [ ] Figure out hangs

Release Notes:

- N/A

---------

Co-authored-by: Ben Kunkle <ben@zed.dev>
Co-authored-by: Agus Zubiaga <agus@zed.dev>
```

## Parents

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

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