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:
co-authored by
Claude Opus 4.6
parent
a75bc99852
commit
d421b9583f
@@ -455,6 +455,17 @@ impl LocalCodeEditorView {
|
||||
CodeEditorEvent::DelayedRenderingFlushed => {
|
||||
ctx.emit(LocalCodeEditorEvent::DelayedRenderingFlushed);
|
||||
}
|
||||
CodeEditorEvent::CompletionNavigateUp => {
|
||||
me.completion_state.move_selection(-1);
|
||||
ctx.notify();
|
||||
}
|
||||
CodeEditorEvent::CompletionNavigateDown => {
|
||||
me.completion_state.move_selection(1);
|
||||
ctx.notify();
|
||||
}
|
||||
CodeEditorEvent::CompletionConfirm => {
|
||||
me.confirm_completion(ctx);
|
||||
}
|
||||
CodeEditorEvent::VimGotoDefinition
|
||||
| CodeEditorEvent::VimFindReferences
|
||||
| CodeEditorEvent::VimShowHover => {
|
||||
@@ -1934,6 +1945,9 @@ impl LocalCodeEditorView {
|
||||
let had_refs = self.close_find_references_card(ctx);
|
||||
let had_hover = self.lsp_hover_state.clear();
|
||||
let had_completion = self.completion_state.dismiss();
|
||||
if had_completion {
|
||||
self.sync_completion_intercept(ctx);
|
||||
}
|
||||
had_refs || had_hover || had_completion
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user