zed/crates
Kirill Bulatov 703c9655a0
Always resolve code action if needed (#8904)
Follow-up of https://github.com/zed-industries/zed/pull/8874 and
https://github.com/zed-industries/zed/pull/7635
Closes https://github.com/zed-industries/zed/issues/7609

* mentions all `lsp::CodeActions` properties in the Zed client resolve
capabilities to remove more json out of general actions request
potentially
* removes odd `CodeActions.data` field checks, as that field is opaque
and is intended to store data, needed by the langserver to resolve this
code action
* if any `CodeAction` lacks either `command` or `edits` fields, tries to
resolve the action

This all effectively causes Zed to always fire an action resolve
request, since we update actions list (replacing the resolved actions
with the new, unresolved ones) via `refresh_code_actions`

9e66d48ccd/crates/editor/src/editor.rs (L3650)
that is being called on selections change and the actions menu open.

Yet, we do not query the resolve until the action is either applied
(selected in the list), or called for formatting, so it seems to be fine
to resolve them always, as it's not a frequent operation such as
reacting to every keystroke.


Release Notes:

- Fixed certain code actions not being resolved properly ([7609](https://github.com/zed-industries/zed/issues/7609))

---------

Co-authored-by: Derrick Laird <swampdonk@gmail.com>
2024-03-05 23:42:12 +02:00
..
activity_indicator Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
ai Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
assets Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
assistant Enable clippy::cmp_owned (#8899) 2024-03-05 14:36:53 -05:00
audio Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
auto_update Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
breadcrumbs Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
call Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
channel Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
cli Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
client Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
clock Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
collab Enable tokio-console (#8897) 2024-03-05 10:56:14 -07:00
collab_ui Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
collections Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
color Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
command_palette Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
command_palette_hooks Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
copilot Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
copilot_ui Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
db Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
diagnostics Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
editor Enable clippy::borrow_deref_ref (#8894) 2024-03-05 12:24:54 -05:00
extension Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
extension_api Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
extensions_ui Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
feature_flags Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
feedback Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
file_finder Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
fs Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
fsevent Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
fuzzy Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
git Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
go_to_line Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
gpui Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
gpui_macros Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
install_cli Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
journal Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
language Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
language_selector Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
language_tools Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
languages Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
live_kit_client Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
live_kit_server Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
lsp Always resolve code action if needed (#8904) 2024-03-05 23:42:12 +02:00
markdown_preview Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
media Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
menu Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
multi_buffer Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
node_runtime Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
notifications Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
outline Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
picker Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
prettier Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
project Always resolve code action if needed (#8904) 2024-03-05 23:42:12 +02:00
project_core Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
project_panel Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
project_symbols Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
quick_action_bar Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
recent_projects Improve wording on recent projects placeholder instructions 2024-03-05 13:51:25 -05:00
refineable Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
release_channel Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
rich_text Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
rope Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
rpc Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
search Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
semantic_index Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
settings Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
snippet Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
sqlez Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
sqlez_macros Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
story Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
storybook Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
sum_tree Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
task Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
tasks_ui Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
telemetry_events Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
terminal Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
terminal_view Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
text Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
theme Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
theme_importer Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
theme_selector Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
time_format Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
ui Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
util Windows: use folders under AppData (#8828) 2024-03-05 09:48:27 -08:00
vcs_menu Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
vim Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
welcome Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
workspace Enable clippy::implied_bounds_in_impls (#8906) 2024-03-05 16:04:55 -05:00
zed Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00
zed_actions Move Clippy configuration to the workspace level (#8891) 2024-03-05 12:01:17 -05:00