feat: add autocompleteMaxVisible setting for configurable dropdown height
This commit is contained in:
committed by
Mario Zechner
parent
06a7fedda5
commit
b212314f45
@@ -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 ?? " ";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user