Wire up completion keyboard navigation and add AGENTS.md

- Tab/Enter confirms the selected completion item
- Up/Down arrows navigate the completion menu
- Escape dismisses the menu (via existing dismiss_lsp_overlays)
- Editor intercepts keys via completion_intercept_keys flag when menu is showing
- Add AGENTS.md with LLM-powered predictive autocomplete idea

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ryan Ward
2026-05-18 16:08:48 -05:00
co-authored by Claude Opus 4.6
parent a75bc99852
commit d421b9583f
5 changed files with 85 additions and 0 deletions
+22
View File
@@ -805,6 +805,28 @@ impl TypedActionView for CodeEditorView {
return;
}
// When completion menu is active, redirect navigation/confirm keys to the parent.
if self.completion_intercept_keys {
match action {
MoveUp => {
ctx.emit(super::CodeEditorEvent::CompletionNavigateUp);
return;
}
MoveDown => {
ctx.emit(super::CodeEditorEvent::CompletionNavigateDown);
return;
}
Tab | Enter => {
ctx.emit(super::CodeEditorEvent::CompletionConfirm);
return;
}
Escape => {
// Let escape fall through to normal handling (which emits EscapePressed)
}
_ => {}
}
}
match action {
UserTyped(content) => self.user_insert(content, ctx),
VimUserTyped(content) => {