ZIm/crates
Kirill Bulatov d164034198
Allow all completions with preresolved additional text edits (#2711)
Deals with https://github.com/zed-industries/community/issues/752
Deals with https://github.com/zed-industries/community/issues/566

Currently, when converting from LSP to Zed objects, completions with
non-empty `additional_text_edits` are filtered out.
Later, all other completions form a list and the selected one gets the
`Editor::confirm_completion` call, which always queries an LSP
completion resolve request to get the `additional_text_edits` field.

Otherwise, `additional_text_edits` field is ignored entirely for the
rest of the completion lifetime — and we always pass the selected
completion through the resolve request.

The PR changes the logic, removing the `additional_text_edits` filtering
and instead of resolving every completion, now we check for
`additional_text_edits` in the completion before resolving: resolve
happens only if the data is absent.

Generally, feels like resolve has to happen before the completion
selection: LSP servers may send us markdown for completion documentation
preview pop ups and similar extra info.
Also, the server may lack resolve capabilities entirely, always sending
the request seems dangerous.
For now, the PR does not attempt to change either.

Release Notes:

- Brings rust-analyzer's postfix completions and others completions with
preresolved additional text edits
2023-07-12 22:10:18 +03:00
..
activity_indicator Merge branch 'main' into fix-broken-lsp-installations 2023-06-28 16:46:06 -04:00
ai Merge branch 'main' into update-assistant-styles 2023-07-10 10:22:18 -04:00
audio Update collaboration sounds, add sounds to screensharing 2023-07-04 16:18:42 -04:00
auto_update Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
breadcrumbs Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
call Add call events 2023-07-11 13:58:55 -04:00
cli Prevent duplicate instances by coordinating via a socket 2023-07-07 14:19:44 -04:00
client Add call events 2023-07-11 13:58:55 -04:00
clock Fixed a bug where buffer saved clocks would desynchronize in rare execution paths 2023-06-07 16:10:45 -07:00
collab Add call events 2023-07-11 13:58:55 -04:00
collab_ui Add call events 2023-07-11 13:58:55 -04:00
collections Move command palette filter into collections crate 2023-03-28 20:13:17 -07:00
command_palette Refactor LSP restart logic 2023-07-11 21:56:55 +03:00
context_menu Introduce a WindowContext::focus method that implies the window id 2023-07-05 09:39:04 +02:00
copilot Merge branch 'main' into fix-broken-lsp-installations 2023-06-28 16:46:06 -04:00
copilot_button Remove on_click_out handler from context menu 2023-06-29 17:10:51 -07:00
db Use different port and handshake for different release channels 2023-07-07 14:20:39 -04:00
diagnostics Split Interactive into Interactive and Toggleable (#2628) 2023-06-21 15:03:08 -04:00
drag_and_drop Prevent some cases of clipping icons due to pixel coord rounding 2023-05-08 11:42:00 -04:00
editor Force resolve all completions, to ensure their edits are up-to-date 2023-07-12 21:10:01 +03:00
feedback Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
file_finder Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
fs vcs: Add 'create branch' button 2023-07-07 18:36:55 +02:00
fsevent 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
fuzzy remove commented line 2023-02-27 12:06:10 -08:00
git Clean up final remaining code paths calling old diff update method 2023-05-25 14:41:09 -04:00
go_to_line Add Modal::has_focus and introduce a ModalHandle trait object 2023-07-05 09:39:56 +02:00
gpui Skip key down event if preceded by its key equivalent version 2023-07-07 12:02:08 +02:00
gpui_macros Add a derive macro for Element 2023-06-25 07:51:50 -06:00
install_cli 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
journal Enable test-support on editor in tests 2023-05-20 09:54:38 -06:00
language Merge branch 'main' of github.com:zed-industries/zed into vector_store 2023-07-11 20:05:29 -04:00
language_selector Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
language_tools Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
live_kit_client chore: Replace lazy_static Mutex with const. (#2693) 2023-07-07 15:07:12 +02:00
live_kit_server 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
lsp Remove a flacky test, fix the failing one 2023-06-29 22:45:04 +03:00
media Update rust-bindgen dev-dependencies 2023-06-04 23:34:22 -04:00
menu Remove internal actions from menu crate 2023-04-27 14:29:11 +02:00
node_runtime Reinstall Node whenever a NodeRuntime operation has serious error 2023-06-28 16:43:45 -04:00
outline Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
picker Z-2276/Z-2275: Project & Branch switchers (#2662) 2023-07-05 13:09:40 -04:00
plugin 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
plugin_macros Fix typos 2023-06-02 22:02:19 -04:00
plugin_runtime Fix typos 2023-06-02 22:02:19 -04:00
project Allow all completions with preresolved additional text edits (#2711) 2023-07-12 22:10:18 +03:00
project_panel fmt and update dependency 2023-06-29 17:49:42 -07:00
project_symbols Rename on/off states to active/inactive 2023-06-20 16:05:23 -07:00
recent_projects fixup! recent_projects: Perform fuzzy search on compacted paths. 2023-07-11 15:29:15 +02:00
rope Simplify InlayMap::splice interface 2023-06-29 22:25:49 +03:00
rpc Post-rebase fixes 2023-06-29 22:39:33 +03:00
search project_search: display result count on cmd-enter 2023-07-10 14:21:55 +02:00
settings Accept null as a valid action, to disable a keystroke 2023-07-04 21:11:28 +03:00
snippet 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
sqlez Fix typos 2023-06-02 22:02:19 -04:00
sqlez_macros 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
staff_mode 🎨 Specify more dependencies at the workspace level 2023-04-24 17:41:55 -07:00
sum_tree Account for inlay biases when clipping a point 2023-06-29 22:25:50 +03:00
terminal Fix typos 2023-06-02 22:02:19 -04:00
terminal_view Fix a bug where the terminal would not be closed by the terminal exiting (#2706) 2023-07-11 12:23:26 -07:00
text Remove excessive hint update queries 2023-06-30 22:03:21 +03:00
theme Merge branch 'main' into piotr/z-2556-add-create-branch-button 2023-07-12 18:11:52 +02:00
theme_selector Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
util Merge branch 'main' of github.com:zed-industries/zed into vector_store 2023-06-30 09:58:13 -04:00
vcs_menu Piotr/z 2556 add create branch button (#2696) 2023-07-12 18:46:33 +02:00
vector_store added test registration for project settings 2023-07-11 20:12:43 -04:00
vim vim: { } to navigate by paragraph (#2668) 2023-07-07 14:59:06 -06:00
welcome Split out Interactive<T> into Toggle<T> and Interactive<T> 2023-06-20 16:05:20 -07:00
workspace Fix a bug where the terminal would not be closed by the terminal exiting (#2706) 2023-07-11 12:23:26 -07:00
xtask Fixup xtask compilation 2023-06-22 18:06:52 +02:00
zed v0.96.x dev 2023-07-12 13:30:28 -04:00
zed-actions Add Sign in button for an unregistered user 2023-06-15 22:05:43 -07:00