feat: add autocompleteMaxVisible setting for configurable dropdown height

This commit is contained in:
Colin Mason 2026-01-26 20:02:24 -05:00 committed by Mario Zechner
parent 06a7fedda5
commit b212314f45
8 changed files with 63 additions and 4 deletions

View file

@ -81,6 +81,7 @@ export interface Settings {
doubleEscapeAction?: "fork" | "tree"; // Action for double-escape with empty editor (default: "tree")
thinkingBudgets?: ThinkingBudgetsSettings; // Custom token budgets for thinking levels
editorPaddingX?: number; // Horizontal padding for input editor (default: 0)
autocompleteMaxVisible?: number; // Max visible items in autocomplete dropdown (default: 5)
showHardwareCursor?: boolean; // Show terminal cursor while still positioning it for IME
markdown?: MarkdownSettings;
}
@ -673,6 +674,15 @@ export class SettingsManager {
this.save();
}
getAutocompleteMaxVisible(): number {
return this.settings.autocompleteMaxVisible ?? 5;
}
setAutocompleteMaxVisible(maxVisible: number): void {
this.globalSettings.autocompleteMaxVisible = Math.max(3, Math.min(20, Math.floor(maxVisible)));
this.save();
}
getCodeBlockIndent(): string {
return this.settings.markdown?.codeBlockIndent ?? " ";
}