mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-24 11:01:54 +00:00
ed61abb8b8
Closes https://github.com/zed-industries/zed/issues/19214 Closes https://github.com/zed-industries/zed/pull/22443 Adds `resolved` property into Zed completion item data, to ensure we resolve every completion item exactly once. There are 2 paths for singplayer Zed, and corresponding 2 analogues for multi player code, where resolve may happen: * completions menu display & selection, that ends up using `resolve_completions` in `lsp_store.rs` * applying a completion menu entry, that ends up using `apply_additional_edits_for_completion` in `lsp_store.rs` Now, all local counterparts check `enabled` field before resolving and set it to true afterwards, and reuse the same `resolve_completion_local` method for resolving the items. A logic for re-generating docs and item labels was moved out from the `resolve_completion_local` method into a separate method, as `apply_additional_edits_for_completion` does not need that, but needs the rest of the logic for resolving. During the extraction, I've noted that multiplayer clients are not getting the item labels, regenerated after the resolve — as the Zed protocol-based flow is not the exact copy of the local resolving. To improve that, `resolve_completion_remote` needs to be adjusted, but this change is omitted to avoid bloating the PR. Release Notes: - Fixed autocomplete inserting multiple imports |
||
---|---|---|
.. | ||
proto | ||
src | ||
build.rs | ||
Cargo.toml | ||
LICENSE-GPL |