2

Currently it looks like enter image description here

enter image description here

But this is a bit annoying - as the echo messages changes between single line and multi-lines, the mode-line is moving up and down.

I know I can truncate the message to make it always displayed as single line.

But I think having a way to display the messages over mode-line (using chilframe or whatever I guess) is a better solution for me. How can I achieve this? (I'm looking for a general solution not limited to eldoc or lsp-mode) Thanks.

1 Answer 1

1

I think the direction of thought could be towards enabling eldoc-echo-area-prefer-doc-buffer and configuring *eldoc* buffer to show up the way you need it. Maybe with popper, or simply

(customize-set-variable
 'display-buffer-alist
 '(("\\*eldoc\\*"
    (display-buffer-reuse-window display-buffer-below-selected)
    (window-height . fit-window-to-buffer))))

or something similar (e.g. with an action function display-buffer-in-child-frame).

For more information on the latter, see (info "(elisp) Buffer Display Action Functions") and Demystifying Emacs’s Window Manager.

2
  • 1
    That seems to work with eldoc. But there are lots of messages using other functions like lsp--messages which use message inside. Aug 23, 2023 at 9:21
  • I'm not an lsp-mode user, but would start by looking into the core options for configuration. And your comment may be a good suit for creating a follow-up question anyway.
    – Y. E.
    Aug 23, 2023 at 9:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.