有没有办法让 eldoc 在打字的时候也显示信息?

eldoc 可以显示当前所在的函数的参数列表,比如在 python-mode 中。但是有一个问题,就是一旦开始打字,这些信息就消失了,有没有办法一直保持显示这些信息呢?

(setq eldoc-print-after-edit t)是这个吗

If non-nil eldoc info is only shown when editing.
Changing the value requires toggling ‘eldoc-mode’.

貌似改了之后,只有打字的时候才会显示了,有没有移动光标和打字的时候都显示的办法呢?

(eldoc-add-command 'self-insert-command)

只用这个试试,可以自己加命令

1 个赞
;; Decide whether now is a good time to display a message.
(defun my/eldoc-display-message-p ()
  t)
(advice-add 'eldoc-display-message-p :override 'my/eldoc-display-message-p)
3 个赞