mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-04 03:35:00 +00:00
feat: Add modal cursor shape configuration
This commit is contained in:
parent
bbfafed372
commit
6c570b1847
1 changed files with 16 additions and 6 deletions
22
aider/io.py
22
aider/io.py
|
@ -6,6 +6,7 @@ from datetime import datetime
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
from prompt_toolkit.completion import Completer, Completion, ThreadedCompleter
|
from prompt_toolkit.completion import Completer, Completion, ThreadedCompleter
|
||||||
|
from prompt_toolkit.cursor_shapes import ModalCursorShapeConfig
|
||||||
from prompt_toolkit.enums import EditingMode
|
from prompt_toolkit.enums import EditingMode
|
||||||
from prompt_toolkit.history import FileHistory
|
from prompt_toolkit.history import FileHistory
|
||||||
from prompt_toolkit.key_binding import KeyBindings
|
from prompt_toolkit.key_binding import KeyBindings
|
||||||
|
@ -237,6 +238,7 @@ class InputOutput:
|
||||||
"output": self.output,
|
"output": self.output,
|
||||||
"lexer": PygmentsLexer(MarkdownLexer),
|
"lexer": PygmentsLexer(MarkdownLexer),
|
||||||
"editing_mode": self.editingmode,
|
"editing_mode": self.editingmode,
|
||||||
|
"cursor": ModalCursorShapeConfig(),
|
||||||
}
|
}
|
||||||
if self.input_history_file is not None:
|
if self.input_history_file is not None:
|
||||||
session_kwargs["history"] = FileHistory(self.input_history_file)
|
session_kwargs["history"] = FileHistory(self.input_history_file)
|
||||||
|
@ -331,8 +333,12 @@ class InputOutput:
|
||||||
{
|
{
|
||||||
"": self.user_input_color,
|
"": self.user_input_color,
|
||||||
"pygments.literal.string": f"bold italic {self.user_input_color}",
|
"pygments.literal.string": f"bold italic {self.user_input_color}",
|
||||||
"completion-menu": f"bg:{self.completion_menu_bg_color} {self.completion_menu_color}",
|
"completion-menu": (
|
||||||
"completion-menu.completion.current": f"bg:{self.completion_menu_current_bg_color} {self.completion_menu_current_color}",
|
f"bg:{self.completion_menu_bg_color} {self.completion_menu_color}"
|
||||||
|
),
|
||||||
|
"completion-menu.completion.current": (
|
||||||
|
f"bg:{self.completion_menu_current_bg_color} {self.completion_menu_current_color}"
|
||||||
|
),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
@ -478,10 +484,14 @@ class InputOutput:
|
||||||
|
|
||||||
if self.pretty and self.user_input_color:
|
if self.pretty and self.user_input_color:
|
||||||
style = {
|
style = {
|
||||||
"": self.user_input_color,
|
"": self.user_input_color,
|
||||||
"completion-menu": f"bg:{self.completion_menu_bg_color} {self.completion_menu_color}",
|
"completion-menu": (
|
||||||
"completion-menu.completion.current": f"bg:{self.completion_menu_current_bg_color} {self.completion_menu_current_color}",
|
f"bg:{self.completion_menu_bg_color} {self.completion_menu_color}"
|
||||||
}
|
),
|
||||||
|
"completion-menu.completion.current": (
|
||||||
|
f"bg:{self.completion_menu_current_bg_color} {self.completion_menu_current_color}"
|
||||||
|
),
|
||||||
|
}
|
||||||
else:
|
else:
|
||||||
style = dict()
|
style = dict()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue