As with the comment,
pos-tip-show works fine for me too.
I did hack together a better (but not perfect) version of the
momentary-string-display version. I just rewrote the display function so that it deleted the overlay passively through a hook instead of waiting for an exit-char, which doesn't seem appropriate for what you are trying to do. The display function I put together temporarily overwrites the next line of the buffer with the message. See if you like it.
(defvar my-display-overlay nil)
(defun my-delete-string-display ()
(when (overlayp my-display-overlay)
(remove-hook 'post-command-hook 'my-delete-string-display))
(defun my-string-display-next-line (string)
"Overwrite contents of next line with STRING until next command."
(let (str (concat (make-string (1+ (current-indentation)) 32)
'face '(:background "#3e4451"))))
(setq start-pos (point))
(setq end-pos (point))
(setq my-display-overlay (make-overlay start-pos end-pos))
;; Hide full line
(overlay-put my-display-overlay 'display "")
;; Display message
(overlay-put my-display-overlay 'before-string str))
(add-hook 'post-command-hook 'my-delete-string-display))))
(defun my-eldoc-display-message-momentary (format-string &rest args)
"Display eldoc message near point."
(apply 'format format-string args))))
(setq eldoc-message-function #'my-eldoc-display-message-momentary)