Kirill Bulatov
8a7a78fafb
Avoid modifying the LSP message before resolving it (#26347)
Closes https://github.com/zed-industries/zed/issues/21277
To the left is current Zed, right is the improved version.
3rd message, from Zed, to resolve the item, does not have `textEdit` on
the right side, and has one on the left.
Seems to not influence the end result though, but at least Zed behaves
more appropriate now.
<img width="1727" alt="image"
src="https://github.com/user-attachments/assets/ca1236fd-9ce2-41ba-88fe-1f3178cdcbde"
/>
Instead of modifying the original LSP completion item, store completion
list defaults and apply them when the item is requested (except `data`
defaults, needed for resolve).
Now, the only place that can modify the completion items is this method,
and Python impl seems to be the one doing it:
https://github.com/zed-industries/zed/blob/ca9c3af56ffb05a789c2b946489f4406af2c8281/crates/languages/src/python.rs#L182-L204
Seems ok to leave untouched for now.
Release Notes:
- Fixed LSP completion items modified before resolve request
2025-03-10 00:12:53 +02:00
..
2025-02-19 08:55:36 -07:00
2025-03-06 21:30:05 +00:00
2025-02-18 20:30:33 +00:00
2025-03-05 18:45:09 -08:00
2025-01-15 19:31:21 +00:00
2025-01-27 04:00:27 +00:00
2025-02-04 10:24:35 -08:00
2024-10-16 12:14:40 +02:00
2025-03-07 10:51:46 -07:00
2025-03-07 23:33:48 +00:00
2025-02-18 20:30:33 +00:00
2025-03-10 00:12:53 +02:00
2025-03-10 00:12:53 +02:00
2025-02-18 20:30:33 +00:00
2025-03-07 19:56:24 +00:00
2025-03-06 23:26:46 +02:00
2025-02-18 20:30:33 +00:00
2025-03-10 00:12:53 +02:00
2024-04-02 11:13:18 +02:00
2025-03-03 10:32:49 -05:00
2025-02-27 22:57:59 +00:00
2025-02-04 10:24:35 -08:00
2025-03-05 08:47:49 -07:00
2025-02-18 20:30:33 +00:00
2025-03-05 21:16:46 +00:00
2025-01-26 03:02:45 +00:00