mirror of
https://github.com/zed-industries/zed.git
synced 2026-05-30 03:34:30 +00:00
|
Some checks failed
run_tests / orchestrate (push) Has been cancelled
run_tests / check_style (push) Has been cancelled
run_tests / doctests (push) Has been cancelled
run_tests / check_wasm (push) Has been cancelled
run_tests / check_dependencies (push) Has been cancelled
run_tests / check_docs (push) Has been cancelled
run_tests / check_licenses (push) Has been cancelled
run_tests / check_postgres_and_protobuf_migrations (push) Has been cancelled
run_tests / extension_tests (push) Has been cancelled
run_tests / tests_pass (push) Has been cancelled
run_tests / check_scripts (push) Has been cancelled
run_tests / clippy_windows (push) Has been cancelled
run_tests / clippy_linux (push) Has been cancelled
run_tests / clippy_mac (push) Has been cancelled
run_tests / clippy_mac_x86_64 (push) Has been cancelled
run_tests / run_tests_windows (push) Has been cancelled
run_tests / run_tests_linux (push) Has been cancelled
run_tests / run_tests_mac (push) Has been cancelled
run_tests / check_workspace_binaries (push) Has been cancelled
run_tests / build_visual_tests_binary (push) Has been cancelled
Cherry-pick of #57790 to stable ---- Follow-up to https://github.com/zed-industries/zed/pull/54100 LSP [code lens](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#codeLens) has the only textual data in [`command`](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#command), which we use for rendering (`command.title`). Certain language servers do not send the command by default until resolved, and this is the only field worth resolving in the code lens which we have to fetch asynchronously as the user types. Not including such lens at all caused flickering and https://github.com/zed-industries/zed/pull/55075 had dealt with this by reserving the block for all code lens and swapping them with the resolved data later. Yet, certain language servers return empty commands even after resolving, to indicate "nothing referencing this", as it is shown in VSCode: <img width="951" height="424" alt="image" src="https://github.com/user-attachments/assets/19c8db24-c312-4c33-9da3-003da11e27a3" /> Before, we have removed blocks for such lens with no command after the resolve, but this caused flickering as reported in https://github.com/zed-industries/zed/pull/55075#issuecomment-4549779927 Thus, this PR falls back to the placeholder for such lens, to avoid any flickering and odd empty blocks. Also, this PR reworks the tests to have the assertions more readable. Before: https://github.com/user-attachments/assets/6af50fc5-92fb-4ce0-b07b-b2867be75c02 After: https://github.com/user-attachments/assets/4aa91c12-ae3c-4fb8-9bbd-a61d6edb79df Release Notes: - Fixed code lens flickering when resolved to no commands Co-authored-by: Kirill Bulatov <kirill@zed.dev> |
||
|---|---|---|
| .. | ||
| benches | ||
| src | ||
| Cargo.toml | ||
| LICENSE-GPL | ||