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-03-07 10:51:46 -07:00
2025-02-24 16:10:26 -05:00
2025-03-06 05:20:06 +00:00
2025-03-07 20:19:28 +00:00
2025-03-09 09:01:49 +00:00
2025-03-07 20:19:28 +00:00
2025-03-09 09:01:49 +00:00
2025-02-24 18:10:12 -05:00
2025-03-01 00:34:28 +01:00
2025-03-07 23:30:56 +00:00
2025-03-07 23:30:56 +00:00
2025-03-03 09:20:15 +00:00
2025-02-24 20:28:20 +00:00
2025-02-25 13:52:42 -05:00
2025-03-03 09:20:15 +00:00
2025-03-05 18:45:09 -08:00
2025-02-28 18:33:35 +01:00
2025-03-02 00:17:55 +08:00
2025-03-06 10:56:28 -07:00
2025-03-06 19:47:52 +00:00
2025-03-07 20:19:28 +00:00
2025-03-07 18:56:17 +00:00
2025-03-07 18:56:17 +00:00
2025-03-07 23:30:56 +00:00
2025-03-09 21:39:14 +05:30
2025-03-08 22:17:20 +00:00
2025-03-10 00:12:53 +02:00
2025-03-07 19:02:35 +00:00
2025-02-28 18:33:35 +01:00
2025-03-03 15:55:15 +00:00
2025-03-06 11:55:00 -05:00
2025-03-06 17:57:31 +00:00
2025-03-06 17:57:31 +00:00
2025-03-06 22:55:28 +00:00
2025-03-05 18:45:09 -08:00
2025-03-04 14:01:08 +08:00
2025-03-07 23:33:48 +00:00
2025-02-20 19:11:32 -05:00
2025-03-08 01:49:06 +00:00
2025-02-24 07:29:55 +00:00
2025-03-07 19:56:24 +00:00
2025-03-06 13:41:21 -05:00
2025-02-28 18:33:35 +01:00
2025-02-26 17:24:35 +01:00
2025-02-27 15:29:32 -03:00
2025-03-06 22:55:28 +00:00
2025-03-08 02:15:15 +00:00
2025-02-28 18:33:35 +01:00
2025-02-28 18:33:35 +01:00
2025-03-05 12:48:10 -05:00
2025-03-09 21:39:14 +05:30
2025-03-04 19:27:37 -07:00
2025-03-09 16:11:37 +00:00
2025-03-06 21:30:05 +00:00
2025-03-06 22:45:47 -05:00
2025-03-06 22:55:28 +00:00
2025-03-03 17:44:49 +05:30
2025-03-06 23:04:48 +05:30
2025-03-08 02:15:15 +00:00
2025-03-06 12:50:42 +01:00
2025-03-06 20:37:54 +00:00
2025-03-03 17:44:49 +05:30
2025-03-06 22:55:28 +00:00
2025-03-06 04:06:00 +00:00
2025-03-05 13:02:29 -07:00
2025-02-27 16:45:59 +01:00
2025-03-10 00:12:53 +02:00
2025-03-06 22:55:28 +00:00
2025-03-03 09:20:15 +00:00
2025-03-06 17:57:31 +00:00
2025-03-01 00:34:28 +01:00
2025-03-10 00:12:53 +02:00
2025-03-06 17:57:31 +00:00
2025-02-27 08:00:42 +00:00
2025-03-06 05:20:06 +00:00
2025-03-06 05:20:06 +00:00
2025-03-06 17:57:31 +00:00
2025-03-03 09:20:15 +00:00
2025-03-06 08:36:10 -06:00
2025-03-06 04:59:57 +00:00
2025-03-04 19:27:37 -07:00
2025-03-09 03:19:09 +05:30
2025-02-21 06:24:02 -03:00
2025-03-06 22:55:28 +00:00
2025-02-28 18:33:35 +01:00
2025-03-06 17:57:31 +00:00
2025-03-03 17:44:49 +05:30
2025-03-05 18:45:09 -08:00
2025-03-05 11:50:39 -08:00
2025-03-05 08:47:49 -07:00
2025-03-06 22:55:28 +00:00
2025-03-06 10:56:28 -07:00
2025-03-05 08:47:49 -07:00
2025-03-06 22:55:28 +00:00
2025-02-28 18:33:35 +01:00
2025-03-07 15:27:00 -03:00
2025-03-07 10:51:46 -07:00
2025-03-07 01:21:20 +00:00
2025-03-06 20:37:54 +00:00
2025-03-06 22:55:28 +00:00
2025-03-06 22:13:34 +00:00
2025-03-06 17:57:31 +00:00
2025-03-08 02:15:15 +00:00
2025-03-07 23:33:48 +00:00
2025-03-09 09:01:49 +00:00
2025-03-08 00:02:57 +00:00
2025-03-06 17:57:31 +00:00