ZIm/assets
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
..
fonts Fix font selection on macOS (#13615) 2024-06-27 17:02:45 -06:00
icons agent: Improve action confirmation UX (#27932) 2025-04-02 17:40:49 +00:00
images add ui::Vector and separate images from icons (#17815) 2024-09-13 17:44:16 -04:00
keymaps Update selection when keeping/rejecting hunks (#27902) 2025-04-02 08:38:26 +00:00
prompts agent: Add more guidelines to system prompt (#27927) 2025-04-02 12:41:51 -03:00
settings 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
sounds Update collaboration sounds, add sounds to screensharing 2023-07-04 16:18:42 -04:00
themes gruvbox: version_control_ -> version_control. (#26665) 2025-03-13 13:13:35 +00:00