Accept partial copilot suggestions (#8682)

Fixes https://github.com/zed-industries/zed/issues/8020
 
This PR adds a new shortcut cmd-right, if a copilot suggestion exists.
The suggestions is accepted word by word.
It emulates the behaviour of VS Code's Github Copilot implementation.


Release Notes:

- Added ability to accept partial copilot suggestions ([8020](https://github.com/zed-industries/zed/issues/8020))
This commit is contained in:
Jonathan 2024-03-03 17:24:48 +01:00 committed by GitHub
parent 56f0418c93
commit 08f9c3f568
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 187 additions and 4 deletions

View file

@ -338,6 +338,7 @@ impl EditorElement {
register_action(view, cx, Editor::display_cursor_names);
register_action(view, cx, Editor::unique_lines_case_insensitive);
register_action(view, cx, Editor::unique_lines_case_sensitive);
register_action(view, cx, Editor::accept_partial_copilot_suggestion);
}
fn register_key_listeners(