Files
zed/crates/remote_server
Parker Loflin 32062546d5 project: Drop per-buffer LSP data when a buffer is released (#67440)
## Summary

`LspStore` keeps per-buffer LSP data, including a snapshot of the
buffer's text and cached results such as document colors and links.
Local projects remove it when the buffer's last language server handle
is released. Remote development projects get the same handles, but
nothing observes their release, so the entries stayed after the buffer
closed.

This change removes a buffer's LSP data and reload task when the buffer
store reports the buffer dropped. Collab guests aren't covered: they
keep every buffer in `shared_with_me` until they leave the project, so
`BufferDropped` never fires for them.

## Testing

- `test_remote_lsp_data_dropped_with_buffer` fails without the change.
- `cargo test -p remote_server --lib` and `./script/clippy -p
remote_server -p project` pass on Windows.

## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Improved memory usage in remote projects after closing files.
2026-11-25 19:22:15 +00:00
..
…