ZIm/crates
frederik-uni 07a77792c5
Add completions.lsp_insert_mode setting to control what ranges are replaced when a completion is inserted (#27453)
This PR adds `completions.lsp_insert_mode` and effectively changes the
default from `"replace"` to `"replace_suffix"`, which automatically
detects whether to use the LSP `replace` range instead of `insert`
range.

`"replace_suffix"` was chosen as a default because it's more
conservative than `"replace_subsequence"`, considering that deleting
text is usually faster and less disruptive than having to rewrite a long
replaced word.

Fixes #27197
Fixes #23395 (again)
Fixes #4816 (again)

Release Notes:

- Added new setting `completions.lsp_insert_mode` that changes what will
be replaced when an LSP completion is accepted. The default is
`"replace_suffix"`, but it accepts 4 values: `"insert"` for replacing
only the text before the cursor, `"replace"` for replacing the whole
text, `"replace_suffix"` that acts like `"replace"` when the text after
the cursor is a suffix of the completion, and `"replace_subsequence"`
that acts like `"replace"` when the text around your cursor is a
subsequence of the completion (similiar to a fuzzy match). Check [the
documentation](https://zed.dev/docs/configuring-zed#LSP-Insert-Mode) for
more information.

---------

Co-authored-by: João Marcos <marcospb19@hotmail.com>
Co-authored-by: Max Brunsfeld <maxbrunsfeld@gmail.com>
2025-04-02 16:55:03 -03:00
..
activity_indicator Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
agent agent: Do some cleanup of feedback comments submission (#27940) 2025-04-02 18:03:18 +00:00
anthropic chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
askpass chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assets chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant Preserve cursor position when resetting excerpts (#27850) 2025-04-01 16:55:10 +00:00
assistant_context_editor chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant_eval Rename assistant2 to agent (#27887) 2025-04-02 00:40:47 +00:00
assistant_settings agent: Improve action confirmation UX (#27932) 2025-04-02 17:40:49 +00:00
assistant_slash_command chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant_slash_commands chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
assistant_tool Fix bug that prevented deletion-only hunks from being kept correctly (#27921) 2025-04-02 17:38:58 +02:00
assistant_tools agent: Improve action confirmation UX (#27932) 2025-04-02 17:40:49 +00:00
audio chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
auto_update chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
auto_update_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
aws_http_client aws_http_client: Copy response headers (#27941) 2025-04-02 15:00:44 -04:00
bedrock chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
breadcrumbs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
buffer_diff Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
call Fix clippy lints that don't currently appear in CI (#27944) 2025-04-02 18:00:16 +00:00
channel chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
cli chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
client chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
clock chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
collab Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
collab_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
collections chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
command_palette Add persistence to command palette history (#26948) 2025-04-01 15:46:35 -06:00
command_palette_hooks vim: :set support (#24209) 2025-02-11 04:55:40 +00:00
component chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
component_preview chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
context_server chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
context_server_settings chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
copilot Add completions.lsp_insert_mode setting to control what ranges are replaced when a completion is inserted (#27453) 2025-04-02 16:55:03 -03:00
credentials_provider Use the development credentials provider in development by default (#25273) 2025-02-20 19:07:16 +00:00
dap chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
dap_adapters debugger: Add args argument to debugger launch config (#27953) 2025-04-02 15:37:12 -04:00
db chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
debugger_tools chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
debugger_ui debugger: Add args argument to debugger launch config (#27953) 2025-04-02 15:37:12 -04:00
deepseek chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
diagnostics Preserve cursor position when resetting excerpts (#27850) 2025-04-01 16:55:10 +00:00
docs_preprocessor docs: Improve Git page (#26566) 2025-03-25 09:22:01 -03:00
editor Add completions.lsp_insert_mode setting to control what ranges are replaced when a completion is inserted (#27453) 2025-04-02 16:55:03 -03:00
evals chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extension chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extension_api chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extension_cli chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extension_host chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
extensions_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
feature_flags chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
feedback chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
file_finder file_finder: Prioritize file name matches over path matches (#27937) 2025-04-02 22:36:46 +05:30
file_icons Allow icon themes to provide their own file associations (#24926) 2025-02-15 00:35:13 +00:00
fs nix: Clean up build (#27881) 2025-04-01 22:35:15 +00:00
fsevent chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
fuzzy chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
git git: Use doc comments for ResetMode variants (#27882) 2025-04-01 22:19:29 +00:00
git_hosting_providers chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
git_ui Fix flickering when staging and unstaging files (#27931) 2025-04-02 17:43:48 +00:00
go_to_line chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
google_ai chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
gpui vim: Add g? convert to Rot13/Rot47 (#27824) 2025-04-02 02:17:00 +00:00
gpui_macros chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
gpui_tokio Switch fully to Rust Livekit (redux) (#27126) 2025-03-28 17:58:23 +00:00
html_to_markdown chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
http_client chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
http_client_tls chore: Extract http-client-tls crate (#26895) 2025-03-17 02:36:37 +00:00
icons agent: Improve action confirmation UX (#27932) 2025-04-02 17:40:49 +00:00
image_viewer chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
indexed_docs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
inline_completion edit predictions: Show user if current project is open source (#24587) 2025-02-10 22:28:56 -03:00
inline_completion_button edit prediction: Show display mode options just for Zed (#27844) 2025-04-01 11:07:24 -03:00
install_cli chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
journal chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
language Add completions.lsp_insert_mode setting to control what ranges are replaced when a completion is inserted (#27453) 2025-04-02 16:55:03 -03:00
language_extension chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
language_model language_model: Remove use_any_tool method from LanguageModel (#27930) 2025-04-02 15:49:21 +00:00
language_model_selector chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
language_models language_model: Remove use_any_tool method from LanguageModel (#27930) 2025-04-02 15:49:21 +00:00
language_selector chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
language_tools chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
languages debugger: Add args argument to debugger launch config (#27953) 2025-04-02 15:37:12 -04:00
livekit_api chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
livekit_client Fix clippy lints that don't currently appear in CI (#27944) 2025-04-02 18:00:16 +00:00
lmstudio chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
lsp chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
markdown chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
markdown_preview chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
media chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
menu Remove unneeded inline tables in Cargo.tomls (#27563) 2025-03-27 02:36:47 +00:00
migrator chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
mistral chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
multi_buffer Update selection when keeping/rejecting hunks (#27902) 2025-04-02 08:38:26 +00:00
node_runtime chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
notifications chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
ollama chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
open_ai chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
outline chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
outline_panel chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
panel chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
paths Notify about broken task file contents (#27185) 2025-03-20 13:06:10 +00:00
picker chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
prettier chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
project Add completions.lsp_insert_mode setting to control what ranges are replaced when a completion is inserted (#27453) 2025-04-02 16:55:03 -03:00
project_panel Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
project_symbols chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
prompt_library chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
prompt_store chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
proto Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
recent_projects workspace: Fix SSH remote restore on second open + Fix panel not opening automatically on new SSH remote (#27830) 2025-04-01 14:05:28 +05:30
refineable chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
release_channel windows: Missing commit of #25412 (#25732) 2025-02-27 08:00:42 +00:00
remote chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
remote_server Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
repl chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
reqwest_client chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
rich_text Allow too many arguments (#26375) 2025-03-10 13:38:30 -06:00
rope chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
rpc Don't unwrap on bad zstd data (#27891) 2025-04-01 20:09:18 -06:00
schema_generator Improve schema_generator CLI (#25898) 2025-03-06 04:59:57 +00:00
search chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
semantic_index chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
semantic_version chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
session chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
settings chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
settings_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
snippet chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
snippet_provider chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
snippets_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
sqlez chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
sqlez_macros windows: Fix tests on Windows (#22616) 2025-02-05 14:30:09 +00:00
story chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
storybook chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
streaming_diff chore: Use workspace fields for edition and publish (#23291) 2025-01-17 17:39:22 +01:00
sum_tree Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
supermaven chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
supermaven_api chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
tab_switcher chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
task debugger: Add args argument to debugger launch config (#27953) 2025-04-02 15:37:12 -04:00
tasks_ui chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
telemetry Git telemetry (#26222) 2025-03-06 10:56:28 -07:00
telemetry_events Remove unused AssistantThreadFeedback event (#27021) 2025-03-18 20:39:54 +00:00
terminal keymap: Allow upper-case keys in keybinds (#27813) 2025-03-31 22:31:01 +00:00
terminal_view chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
text Improve tracking for agent edits (#27857) 2025-04-01 22:13:28 +00:00
theme chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
theme_extension theme: Don't log errors for missing themes until extensions have loaded (#25098) 2025-02-18 17:47:25 +00:00
theme_importer chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
theme_selector chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
time_format chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
title_bar Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
toolchain_selector chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
ui assistant2: Ensure errors are also displayed in populated new thread view (#27869) 2025-04-01 17:06:34 -03:00
ui_input Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
ui_macros chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
ui_prompt chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
util chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
util_macros chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
vim vim: Add g? convert to Rot13/Rot47 (#27824) 2025-04-02 02:17:00 +00:00
vim_mode_setting Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
welcome Allow viewing past commits in Zed (#27636) 2025-03-31 23:26:47 +00:00
workspace workspace: Do not call set_active when deserializing a dock if that dock was not visible (#27852) 2025-04-01 16:33:52 +00:00
worktree Finish removing git repository state and scanning logic from worktrees (#27568) 2025-04-01 17:41:20 -04:00
zed Bump Zed to v0.182 (#27945) 2025-04-02 13:45:42 -04:00
zed_actions chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
zeta chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
zlog chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
zlog_settings zlog: Init (#27273) 2025-03-21 20:08:03 +00:00