By default Emacs ring the bell to attract the user’s attention, this is annoying.
To get a visual signal instead, set visual-bell
with t Emacs should flash the screen to represent a bell.
We can also customize ring-bell-function
to just flash the modeline.
(defun +ring-bell-fn ()
"Blink the mode-line."
(let ((buf (current-buffer)))
(invert-face 'mode-line)
(run-with-timer 0.05 nil
(lambda ()
(with-current-buffer buf
(invert-face 'mode-line))))))
(setq ring-bell-function '+ring-bell-fn
visible-bell t)
Related
Clangd Configuration With Eglot
Eglot是Emacs内置的LSP客户端。Eglot内置已支持大量的LSP服务端。以C++语言为例,Eglot支持clangd和ccls两种服务端模式。