editor: Accept next line prediction (#44411)

Closes  [#20574](https://github.com/zed-industries/zed/issues/20574)

Release Notes:

- Replaced editor action editor::AcceptPartialEditPrediction with
editor::AcceptNextLineEditPrediction and
editor::AcceptNextWordEditPrediction

Tested manually on windows, attaching screen cap.
https://github.com/user-attachments/assets/fea04499-fd16-4b7d-a6aa-3661bb85cf4f

Updated existing test for accepting word prediction in copilot - it is
already marked as flaky, not sure what to do about it and I'm not really
confident creating new one without a working example.

Added migration of keymaps and new defaults for windows, linux, macos in
defaults and in cursor.

This should alleviate
[#21645](https://github.com/zed-industries/zed/issues/21645)
I used some work done in stale PR
https://github.com/zed-industries/zed/pull/25274, hopefully this one
makes it through!

---------

Co-authored-by: Agus Zubiaga <agus@zed.dev>
This commit is contained in:
teleoflexuousandAgus Zubiaga authored and GitHub committed 2025-12-15 18:28:59 +00:00
1 parent b8a7b2981b
commit ff08911ffe
14 files changed
+280 -183

No files matched your search

+2 -1
View File
@@ -58,7 +58,8 @@ In these cases, `alt-tab` is used instead to accept the prediction. When the lan
On Linux, `alt-tab` is often used by the window manager for switching windows, so `alt-l` is provided as the default binding for accepting predictions. `tab` and `alt-tab` also work, but aren't displayed by default.
{#action editor::AcceptPartialEditPrediction} ({#kb editor::AcceptPartialEditPrediction}) can be used to accept the current edit prediction up to the next word boundary.
{#action editor::AcceptNextWordEditPrediction} ({#kb editor::AcceptNextWordEditPrediction}) can be used to accept the current edit prediction up to the next word boundary.
{#action editor::AcceptNextLineEditPrediction} ({#kb editor::AcceptNextLineEditPrediction}) can be used to accept the current edit prediction up to the new line boundary.
## Configuring Edit Prediction Keybindings {#edit-predictions-keybinding}