Skip to content

how about change comint-send-string to comint-send-input? #117

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Spike-Leung opened this issue Mar 29, 2025 · 7 comments
Closed

how about change comint-send-string to comint-send-input? #117

Spike-Leung opened this issue Mar 29, 2025 · 7 comments

Comments

@Spike-Leung
Copy link
Contributor

If sending multi-line input with comint-send-input and customizing the comint-highlight-input face, then comint-send-input can be highlighted and distinguished from other text in coming.

(comint-send-string process text))))

Image

(set-face-attribute 'comint-highlight-prompt nil :foreground (modus-themes-get-color-value 'green-cooler))
(set-face-attribute 'comint-highlight-input nil :foreground (modus-themes-get-color-value 'yellow-warmer))

before:

Image

after:

Image

@tninja
Copy link
Owner

tninja commented Mar 29, 2025

Thanks for the feedback. Agree that make the input text highlight is helpful, it is easier to separate dialogue. Recently I put aider--comint-send-string-syntax-highlight back (https://github.com/tninja/aider.el/blob/main/aider-core.el#L160, previously broke by the markdown change but now it worked again), but it require a face defined by myself: aider-command-text. Wonder if there is standard way for this and no need to define by myself?

@Spike-Leung
Copy link
Contributor Author

I don't know much about it, but defining a face for display isn't bad either.

Perhaps comint-highlight-input could be reused?

Or set comint-highlight-input as the default for aider-command-text?

I understand that aider-command-text and comint-highlight-input should correspond to the same content.

If comint-highlight-input is reused, users who have configured it will see the same configuration when using aider.el.

The advantage of defining aider-command-text might be that users can see that a face can be defined when viewing configurable variables in aider.el.

Even if it's aider-command-text, I think comint-highlight-input can still be set as its default, which would be more convenient for users who have configured comint, ensuring a consistent color in both aider.el's comint buffer and other comint buffers.

@tninja
Copy link
Owner

tninja commented Mar 29, 2025 via email

@tninja
Copy link
Owner

tninja commented Mar 29, 2025

I asked sonnet and it do recommend comint-send-input since it is a more standard way. And I verified that (setq-local comint-highlight-input t) will highlight the input. So there is no need to keep aider-command-text: #118, let me know if it make sense to you.

This is basic highlight, without yellow and green color font you showed. Maybe it is good if it can allow user to customize that?

@Spike-Leung
Copy link
Contributor Author

I can customize with the below config:

(add-hook 'aider-comint-mode-hook (lambda ()
                                    (set-face-attribute 'comint-highlight-prompt nil :foreground (modus-themes-get-color-value 'green-cooler))
                                    (set-face-attribute 'comint-highlight-input nil :foreground (modus-themes-get-color-value 'yellow-warmer))))

(modus-themes-get-color-value 'green-cooler) can be replaced with "red" or "#abcabc"

@tninja
Copy link
Owner

tninja commented Mar 30, 2025

That’s great. Thanks. I’ll add it to README

@Spike-Leung
Copy link
Contributor Author

Thanks!!😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants